addKey method Null safety

GlobalKey<NavigatorState>? addKey(
  1. GlobalKey<NavigatorState> newKey
)

Implementation

GlobalKey<NavigatorState>? addKey(GlobalKey<NavigatorState> newKey) {
  _key = newKey;
  return key;
}