Created
June 23, 2018 16:43
-
-
Save as3eem/504fadbafebdb9d5df218e42033458f2 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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), | |
); | |
} | |
), | |
); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment