Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class MyHomePage extends StatelessWidget {
- @override
- Widget build(BuildContext context) {
- final key = new GlobalKey<ScaffoldState>();
- return new Scaffold(
- key: key,
- floatingActionButton: new Builder(
- builder: (BuildContext context) {
- return new FloatingActionButton(
- onPressed: () {
- key.currentState.showSnackBar(new SnackBar(
- content: new Text("Sending Message"),
- ));
- },
- tooltip: 'Increment',
- child: new Icon(Icons.add),
- );
- }
- ),
- );
- }
- }
Add Comment
Please, Sign In to add comment