Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR DART

flutter snackbar

final snackBar = SnackBar(
  content: Text('Yay! A SnackBar!'),
  action: SnackBarAction(
    label: 'Undo',
    onPressed: () {
      // Some code to undo the change.
    },
  ),
);

 // Find the Scaffold in the widget tree and use
 // it to show a SnackBar.
 Scaffold.of(context).showSnackBar(snackBar);
Source by flutter.dev #
 
PREVIOUS NEXT
Tagged: #flutter #snackbar
ADD COMMENT
Topic
Name
4+2 =