// Scaffold.of. From the key, use the GlobalKey.currentState

// getter. This was previously used to manage SnackBars.

final

GlobalKey

ScaffoldState

scaffoldKey

GlobalKey

ScaffoldState

>();

Scaffold

key:

scaffoldKey

body:

...,

);

scaffoldKey

currentState

showSnackBar

mySnackBar

);

scaffoldKey

currentState

hideCurrentSnackBar

mySnackBar

);

scaffoldKey

currentState