mySnackBar

);

// If a ScaffoldMessenger.key is specified, the ScaffoldMessengerState can be directly

// accessed without first obtaining it from a BuildContext via

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

// getter. This is used to manage SnackBars.

final

GlobalKey

ScaffoldMessengerState

scaffoldMessengerKey

GlobalKey

ScaffoldMessengerState

>();

ScaffoldMessenger

key:

scaffoldMessengerKey

child:

...

scaffoldMessengerKey

currentState

showSnackBar