Advertisement
Guest User

flutter snackbar error

a guest
Jun 18th, 2018
90
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Dart 0.63 KB | None | 0 0
  1.   @override
  2.   Widget build(BuildContext context) {
  3.     final Size screenSize = MediaQuery.of(context).size;
  4.  
  5.     return new Scaffold(
  6.       appBar: new AppBar(
  7.         title: new Text('Greenbook'),
  8.       ),
  9.       body: ...,
  10.       floatingActionButton: new FloatingActionButton(
  11.         onPressed: () {
  12.           if (this._formKey.currentState.validate()) {
  13.             Scaffold.of(context).showSnackBar(new SnackBar(
  14.               content: new Text("Sending Message"),
  15.             ));
  16.             this.submit();
  17.           }
  18.         },
  19.         tooltip: 'Calcular',
  20.         child: new Icon(Icons.done),
  21.       ),
  22.     );
  23.   }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement