of<T> static method

ControlRoute? of<T>([
  1. dynamic identifier
])

@{template route-store-get} Returns ControlRoute from RouteStore by given Type or identifier. Type or identifier is required - check RouteStore.routeIdentifier for more info about Store keys.

RouteStore is typically filled during Control.initControl or via ControlRoot. RouteStore is also stored in Control -> Control.get<RouteStore>() and can be updated anytime,

Using Type as route identifier is recommended. @{endtemplate}

Implementation

static ControlRoute? of<T>([dynamic identifier]) {
  assert(T != dynamic || identifier != null);

  return _store.getRoute<T>(identifier);
}