{ return new Scaffold( appBar: new AppBar( title: new Text('SnackBar'), ), body: new RaisedButton( onPressed: () { var snackbar = new SnackBar( content: new Text('Hello!!')); Scaffold.of(context).showSnackBar(snackbar); }, child: new Text('Show SnackBar'), ), ); } }