WildcardRoute<T> class
Escape route if nothing is found in current context. Usually serves as a wildcard, and is called if no path matching the context is found.
ATTENTION: It is strongly recommended to use one WildcardRoute per module.
- Inheritance
-
- Object
- ParallelRoute<
T> - ChildRoute<
T> - WildcardRoute
Constructors
- WildcardRoute({required Widget child(BuildContext, ModularArguments), TransitionType transition = TransitionType.defaultTransition, CustomTransition? customTransition, Duration duration = const Duration(milliseconds: 300)})
Properties
-
bindContextEntries
→ Map<
Type, BindContext> -
Contains a list of all BindContexts that will need to be active when this route is active.
finalinherited
- child → ModularChild?
-
Widget Builder that will be called when prompted in navigation.
finalinherited
-
children
→ List<
ModularRoute> -
Add children to this route that can be retrieved through the parent route
finalinherited
- context → RouteContext?
-
RouteContext belonging to the route.
finalinherited
- customTransition → CustomTransition?
-
Defines a custom transition.
If the transition is TransitionType.custom, it becomes mandatory to add a CustomTransition() object.
finalinherited
- duration → Duration?
-
define the Transition duration
Default is 300 milliseconds
finalinherited
- hashCode → int
-
The hash code for this object.
no setterinherited
- key ↔ ModularKey
-
Key that references the route in the RouteContext tree.
latefinalinherited
- maintainState → bool
-
Whether the route should remain in memory when it is inactive.
If this is true, then the route is maintained, so that any futures it is holding from the next route will properly resolve when the next route pops. If this is not necessary, this can be set to false to allow the framework to entirely discard the route's widget hierarchy when it is not visible.
If this getter would ever start returning a different value, the
changedInternalState
should be invoked so that the change can take effect.finalinherited -
middlewares
→ List<
Middleware> -
Adds middleware that will be shared among your children.
finalinherited
- name → String
-
name of route
finalinherited
- parent → String
-
guard your parent's path
finalinherited
- popCallback → (void Function(dynamic)?)
-
finalinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- schema → String
-
schema of route
default is ''
finalinherited
- transition → TransitionType?
-
Transition performed when one page overlaps another.
default is TransitionType.defaultTransition;
finalinherited
-
transitions
→ Map<
TransitionType, PageRouteBuilder< T> Function(Widget builder(BuildContext, ModularArguments), Duration transitionDuration, RouteSettings settings, bool maintainState)> -
finalinherited
- uri → Uri
-
Current uri of the route.
finalinherited
Methods
-
addModule(
String name, {required RouteContext module}) → ParallelRoute< T> -
Create a new Route by adding a RouteContext to the context.
inherited
-
copyWith(
{ModularChild? child, RouteContext? context, TransitionType? transition, CustomTransition? customTransition, Duration? duration, String? name, String? schema, void popCallback(dynamic)?, List< Middleware> ? middlewares, List<ModularRoute> ? children, String? parent, Uri? uri, Map<ModularKey, ModularRoute> ? routeMap, Map<Type, BindContext> ? bindContextEntries}) → ParallelRoute<T> -
inherited
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited