Route class
- Inheritance
-
- Object
- ModularRoute
- Route
Constructors
-
Route.delete(String name, Function handler, {List<
ModularMiddleware> middlewares = const []}) -
factory
-
Route.get(String name, Function handler, {List<
ModularMiddleware> middlewares = const []}) -
factory
-
Route.module(String name, {required Module module, List<
ModularMiddleware> middlewares = const []}) -
factory
-
Route.path(String name, Function handler, {List<
ModularMiddleware> middlewares = const []}) -
factory
-
Route.post(String name, Function handler, {List<
ModularMiddleware> middlewares = const []}) -
factory
-
Route.put(String name, Function handler, {List<
ModularMiddleware> middlewares = const []}) -
factory
-
Route.resource(Resource resource, {List<
ModularMiddleware> middlewares = const []}) -
factory
-
Route.websocket(String name, {required WebSocketResource websocket, List<
ModularMiddleware> middlewares = const []}) -
factory
Properties
-
children
→ List<
ModularRoute> -
Add children to this route that can be retrieved through the parent route
finalinherited
- handler → Function?
-
final
- 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
- key ↔ ModularKey
-
Key that references the route in the RouteContext tree.
latefinalinherited
-
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
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- schema → String
-
schema of route
default is ''
finalinherited
- uri ↔ Uri
-
latefinalinherited
Methods
-
addModule(
String name, {required Module module}) → Route -
Create a new Route by adding a RouteContext to the context.
override
-
addParent(
ModularRoute parent) → ModularRoute -
inherited
-
copyWith(
{Handler? handler, String? name, String? schema, Module? module, List< Middleware> ? middlewares, List<ModularRoute> ? children, String? parent, Uri? uri, Map<ModularKey, ModularRoute> ? routeMap, Map<Type, Module> ? innerModules}) → Route -
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