setKey method

void setKey(
  1. GlobalKey<ScaffoldMessengerState> key
)

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;
}