RouteContractTable class

Constructors

RouteContractTable({required Set<String> allowedRoutes})
Creates a table allowing exactly allowedRoutes (plus the navigator root, always — see navigatorRootRoute).
const
RouteContractTable.fromRouteNames(Iterable<String> names)
Creates a table from route names (deduplicated).
factory

Properties

allowedRoutes Set<String>
The route names this contract declares (read-only view).
no setter
hashCode int
The hash code for this object.
no setteroverride
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

allows(String? routeName) bool
Whether routeName is declared (or conforming by construction).
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
override
validatePush(String? routeName) SkinViolation?
Validates one push. Returns the violation when the pushed route does not conform, null when it does.

Operators

operator ==(Object other) bool
The equality operator.
override

Constants

The navigator root route — conforms BY CONSTRUCTION (pilot lesson 3: WidgetsApp pushes it on every cold start).