BaseRoutes class

This is the base definition of a route class

Processes a list of routes for app navigation

Usage:

class Routes extends BaseRoutes {
  Routes()
    : super(
      modules: [
        Todo(), // First defined module gets the root route ('/')
      ],
      defaultTransition: ScalePageTransition(),
    );
}

where ScalePageTransition extends BasePageTransition and Todo extends BaseModule

Constructors

BaseRoutes({required List<BaseModule> modules, BasePageTransition? defaultTransition})
Handles the top level route management of the app given a list of modules and a defaultTransition

Properties

defaultModule BaseModule?
The default module of the application
no setter
defaultTransition BasePageTransition?
The default page transition animation
getter/setter pair
hashCode int
The hash code for this object.
no setterinherited
routes Map<String, BaseModule?>?
The list of top level routes in the app
no setter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
onGenerateRoute(RouteSettings settings) Route
Generates a route object based on the current route name
toString() String
A string representation of this object.
inherited

Operators

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