I want to display a simple SnackBar inside Flutter\'s stateful widget. My application creates new instance of MaterialApp with a stateful widget ca
If you are inside a widget that does not has directly the return Scaffold(...) widget, you can do this:
Scaffold.of(context).showSnackBar(SnackBar(content: Text("Hello from snackbar")));
There is no need to create an extra Scaffold widget because the showSnackBar() method requires one, you can reuse.