Guest User

Untitled

a guest
Jun 24th, 2018
68
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.59 KB | None | 0 0
  1. class MyHomePage extends StatelessWidget {
  2. @override
  3. Widget build(BuildContext context) {
  4. final key = new GlobalKey<ScaffoldState>();
  5. return new Scaffold(
  6. key: key,
  7. floatingActionButton: new Builder(
  8. builder: (BuildContext context) {
  9. return new FloatingActionButton(
  10. onPressed: () {
  11. key.currentState.showSnackBar(new SnackBar(
  12. content: new Text("Sending Message"),
  13. ));
  14. },
  15. tooltip: 'Increment',
  16. child: new Icon(Icons.add),
  17. );
  18. }
  19. ),
  20. );
  21. }
  22. }
Add Comment
Please, Sign In to add comment