scaffoldMessengerKey property Null safety

GlobalKey<ScaffoldMessengerState>? scaffoldMessengerKey
final

A key to use when building the ScaffoldMessenger.

If a scaffoldMessengerKey is specified, the ScaffoldMessenger can be directly manipulated without first obtaining it from a BuildContext via ScaffoldMessenger.of: from the scaffoldMessengerKey, use the GlobalKey.currentState getter.

Implementation

final GlobalKey<ScaffoldMessengerState>? scaffoldMessengerKey;