dispenseNavigatorFromInitiator method

  1. @override
DynamicRoutesNavigator dispenseNavigatorFromInitiator(
  1. Widget initiatorWidget
)
inherited

Implementation

@override
DynamicRoutesNavigator dispenseNavigatorFromInitiator(
    Widget initiatorWidget) {
  if (kDebugMode) {
    final queriedInitiator =
        _initiatorAndParticipatorsMap[initiatorWidget.hashCode];
    assert(
        queriedInitiator != null,
        "The widget provided is not tied to any _dynamicRoutesInstances."
        " Did you forget to call initializeRoutes()?");
  }

  final queriedParticipator = _dynamicRoutesInstances[initiatorWidget];

  return queriedParticipator!;
}