setKey method
Set the GlobalKey to access the ScaffoldMessengerState. Use this if you already have a GlobalKey for ScaffoldMessengerState.
Implementation
void setKey(GlobalKey<ScaffoldMessengerState> key) {
_key = key;
}
Set the GlobalKey to access the ScaffoldMessengerState. Use this if you already have a GlobalKey for ScaffoldMessengerState.
void setKey(GlobalKey<ScaffoldMessengerState> key) {
_key = key;
}