createRouter function

Unrouter createRouter({
  1. required Iterable<Inlet> routes,
  2. Iterable<Guard>? guards,
  3. String base = '/',
  4. int maxRedirectDepth = 8,
  5. History? history,
  6. HistoryStrategy strategy = HistoryStrategy.browser,
})

Creates a Nocterm router backed by core.createRouter.

Implementation

Unrouter createRouter({
  required Iterable<Inlet> routes,
  Iterable<core.Guard>? guards,
  String base = '/',
  int maxRedirectDepth = 8,
  History? history,
  HistoryStrategy strategy = HistoryStrategy.browser,
}) {
  return core.createRouter<Component>(
    routes: routes,
    guards: guards,
    base: base,
    maxRedirectDepth: maxRedirectDepth,
    history: history,
    strategy: strategy,
  );
}