loading...
Cover image for GFToast - A Flutter Toast Widget

GFToast - A Flutter Toast Widget

getwidget profile image GetWidget ・1 min read

Does your Flutter app have a Toast widget then why not try our GFToast widget component to build a nice Flutter Toast Widget?

Alt Text

What is the use of Toast Widget in the Flutter App?

It Could be useful to briefly inform to your app users when certain actions take place. For example, when a user swipes away a message in a list, you might want to inform them that the message has been deleted. You might even want to give them an option to undo the action. In short, this widget component has been using to display quick warning or error messages.

Usage

GFToast should be wrapped inside the GFFloating Widget. The child of the GFFloatingWidget takes GFToast as its argument and the body takes any kind of widgets. The simple code is as shown below.

import 'package:getflutter/getflutter.dart';

 return Scaffold(
   body:GFFloatingWidget(
     child:GFToast(
     text: 'This item already has the label “travel”',
   ),
   body:Text('body or any kind of widget here..')
 )
)

Toast with Call to Action Button

Alt Text

import 'package:getflutter/getflutter.dart';

GFToast(
  text:'This item already has the label “travel”',
  button: GFButton(
     onPressed: () {},
     text: 'Close',
     type: GFButtonType.transparent,
     color: GFColor.success,
   ),
   autoDismiss: false,
),

Read More GFToast Widget: https://docs.getflutter.dev/gf-toast

If you are new then you can start from Getting Start.

If you will face any issue or have any suggestions then get connected on GitHub: GetFlutter GitHub

Posted on by:

getwidget profile

GetWidget

@getwidget

www.getwidget.dev is an open-source UI Library for Flutter App Development built on Flutter SDK. Get Start https://docs.getwidget.dev/

Discussion

markdown guide