Toast message

Toast Message

Flutter Toast Message is also called toast notification message. This is a very small message that sometimes appears at the bottom of the device screen.

It will disappear automatically after the time provided by the developers.

these are toast messages that the custom type of them are used after adding
fluttertoast package in pubspec.yaml 's dependencies and the EsCustomToastContainer located in:
 es_flutter_component/es_toast/es_custom_toast_container.dart
 and is used as:


        

       onTap: () {
                  fToast.showToast(
                    child: EsCustomToastContainer(
                      icon: EsSvgIcon("packages/es_flutter_component/assets/svgs/Megaphone.svg",
                        size: StructureBuilder.dims!.h2IconSize,
                        color: StructureBuilder.styles!.informationColor().informationDark,
                      ),
                      backGroundColor: StructureBuilder.styles!.informationColor().informationLight,
                      contentColor: StructureBuilder.styles!.informationColor().informationDark,
                    ),
                    gravity: ToastGravity.BOTTOM,
                    toastDuration: Duration(seconds: 2),
                  );
                },
                
                and the default type is used as:


                 onTap: () {
                  ScaffoldMessenger.of(context).showSnackBar(SnackBar(
                    content: Text("This is flutter toast."),
                    action: SnackBarAction(
                        label: 'UNDO',
                        onPressed:
                            ScaffoldMessenger.of(context).hideCurrentSnackBar),
                  ));
                },


                
             
Custom type:             

  

 

 

Defalt type: