final

GlobalKey

ScaffoldMessengerState

rootScaffoldMessengerKey

GlobalKey

ScaffoldMessengerState

>();

MaterialApp

scaffoldMessengerKey:

rootScaffoldMessengerKey

home:

...

rootScaffoldMessengerKey

currentState

showSnackBar

mySnackBar

);

rootScaffoldMessengerKey

currentState

hideCurrentSnackBar

mySnackBar

);

rootScaffoldMessengerKey

currentState

removeCurrentSnackBar

mySnackBar