addKey method

Adds a new key to the navigator.

Returns the updated navigator key.

Implementation

GlobalKey<NavigatorState>? addKey(GlobalKey<NavigatorState> newKey) {
  rootDelegate.navigatorKey = newKey;
  return key;
}