Alert

هشدار:
 

 ارائه پیام های بازخوردی را برای اقدامات کاربر با پیام های هشدار انعطاف پذیر .


هشدارها توسط کد flutter در پنل مدیریت آماده می شوند:
 
Simple alert
Bordered alert
Removable alert
Alert with icon
Removable alert with icon
Alert with desired content

Bordered alert with icon
Simple alert:

these are confidence alerts located in:


 es_flutter_component/lib/components/es_alert/es_alerts.dart
 and is used as:

 EsIconButton(
                EsSvgIcon("packages/es_flutter_component/assets/svgs/danger.svg",
                  size: StructureBuilder.dims!.h2IconSize,
                  color: StructureBuilder.styles!.errorColor().errorDark,),

                fillColor: StructureBuilder.styles!.alertColor().error,
                onTap: () {
                  EsAlerts.error(
                    context,
                    "message",
                  );
                },
              ),

Bordered alert:

these are bordered alerts located in:
 es_flutter_component/lib/components/es_alert/es_alerts.dart
 and is used as:

 EsIconButton(
                EsSvgIcon("packages/es_flutter_component/assets/svgs/danger.svg",
                  size: StructureBuilder.dims!.h2IconSize,
                  color: StructureBuilder.styles!.errorColor().errorDark,),

                fillColor: StructureBuilder.styles!.alertColor().error,
                onTap: () {
                  EsAlerts.error(context, "message",
                      decoration: BoxDecoration(
                          borderRadius: BorderRadius.all(Radius.circular(
                              StructureBuilder.dims!.h1BorderRadius)),
                          border: Border.all(
                              color: StructureBuilder.styles!.errorColor().errorDark,
                              width: 2)));
                },
              ),


Removable alert:

these are removable alerts located in:
es_flutter_component/lib/components/es_alert/es_alerts.dart
and is used as:

 EsButton(
                text: AppLocalizations.of(context)!.error,
                fillColor: StructureBuilder.styles!.errorColor,
                onTap: () {
                  EsAlerts.error(context, "message", hasClose: true);
                },
              ),





Alert with icon:

these are alerts with icon located in:
es_flutter_component/lib/components/es_alert/es_alerts.dart
and is used as:

 EsIconButton(
                EsSvgIcon(
                  "packages/es_flutter_component/assets/svgs/danger.svg",
                  size: StructureBuilder.dims!.h2IconSize,
                  color: StructureBuilder.styles!.errorColor().errorDark,
                ),
                fillColor: StructureBuilder.styles!.alertColor().error,
                onTap: () {
                  EsAlerts.error(
                    context,
                    "message",
                    icon:EsSvgIcon(
                      "packages/es_flutter_component/assets/svgs/danger.svg",
                      size: StructureBuilder.dims!.h2IconSize,
                      color: StructureBuilder.styles!.errorColor().errorDark,
                    ),
                  );
                },
              ),







Removable alert with icon:

these are removable alerts with icon located in:
es_flutter_component/lib/components/es_alert/es_alerts.dart
and is used as:

EsIconButton(
EsSvgIcon(
"packages/es_flutter_component/assets/svgs/danger.svg",
size: StructureBuilder.dims!.h2IconSize,
color: StructureBuilder.styles!.errorColor().errorDark,
),
fillColor: StructureBuilder.styles!.alertColor().error,
onTap: () {
EsAlerts.error(
context,
"message",
hasClose: true,
icon: EsSvgIcon(
"packages/es_flutter_component/assets/svgs/danger.svg",
size: StructureBuilder.dims!.h2IconSize,
color: StructureBuilder.styles!.errorColor().errorDark,
),
);
},
),







Alert with desired content:

these are alerts with desired content located in:
es_flutter_component/lib/components/es_alert/es_alerts.dart
and is used as:

EsIconButton(
EsSvgIcon(
"packages/es_flutter_component/assets/svgs/danger.svg",
size: StructureBuilder.dims!.h2IconSize,
color: StructureBuilder.styles!.errorColor().errorDark,
),
fillColor: StructureBuilder.styles!.alertColor().error,
onTap: () {
EsAlerts.error(
context,
"message",
myContent: Column(
children: [
EsAvatarImage(
path: "assets/images/img1.jpg",
radius: StructureBuilder.dims!.h0Padding * 2,
),
EsOrdinaryText(
AppLocalizations.of(context)!.lorm,
color: StructureBuilder.styles!.t1Color,
)
],
),

);
},
),






Bordered alert with icon"

these are bordered alerts with icon located in:
 es_flutter_component/lib/components/es_alert/es_alerts.dart
 and is used as:

 EsIconButton(
                    EsSvgIcon(
                      "packages/es_flutter_component/assets/svgs/danger.svg",
                      size: StructureBuilder.dims!.h2IconSize,
                      color: StructureBuilder.styles!.errorColor().errorDark,
                    ),
                    fillColor: StructureBuilder.styles!.alertColor().error,
                    onTap: () {
                      EsAlerts.error(context, "message",
                          hasClose: true,
                          icon:  EsSvgIcon(
                            "packages/es_flutter_component/assets/svgs/danger.svg",
                            size: StructureBuilder.dims!.h2IconSize,
                            color: StructureBuilder.styles!.errorColor().errorDark,
                          ),
                          decoration: BoxDecoration(
                              borderRadius: BorderRadius.all(Radius.circular(
                                  StructureBuilder.dims!.h1BorderRadius)),

                              border: Border.all(
                                  color: StructureBuilder.styles!.errorColor().errorDark,
                                  width: 2),
                            
                          ));
                    },
                  ),