ModuleRoute<T> class

This route represents a cluster of routes from another module that will be concatenated to the context of the parent module.

Inheritance

Constructors

ModuleRoute(String name, {required Module module, TransitionType? transition, CustomTransition? customTransition, Duration? duration, List<RouteGuard> guards = const []})
factory

Properties

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
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
innerModules Map<Type, Module>
Contains a list of all BindContexts that will need to be active when this route is active.
finalinherited
isFullscreenDialog bool
Whether this page route is a full-screen dialog. Default is false;
finalinherited
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
module Module?
Module belonging to the route.
getter/setter pairinherited
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(ModularChild builder, Duration transitionDuration, RouteSettings settings, bool maintainState)>
finalinherited
uri Uri
latefinalinherited

Methods

addModule(String name, {required Module module}) ParallelRoute<T>
Create a new Route by adding a RouteContext to the context.
inherited
addParent(covariant ParallelRoute parent) ModularRoute
inherited
copyWith({ModularChild? child, TransitionType? transition, CustomTransition? customTransition, Duration? duration, Module? module, bool? isFullscreenDialog, String? name, String? schema, void popCallback(dynamic)?, List<Middleware>? middlewares, List<ModularRoute>? children, String? parent, Uri? uri, Map<ModularKey, ModularRoute>? routeMap, Map<Type, Module>? innerModules}) ModuleRoute<T>
override
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