Migration guide

Code before migration:

// The ScaffoldState of the current context was used for managing SnackBars.

Scaffold

of

context

showSnackBar

mySnackBar

);

Scaffold

of

context

hideCurrentSnackBar

mySnackBar

);

Scaffold

of

context

removeCurrentSnackBar

mySnackBar

);

// If a Scaffold.key is specified, the ScaffoldState can be directly

// accessed without first obtaining it from a BuildContext via

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