Route class
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
-
bindContextEntries
→ Map<Type, BindContext>
-
Contains a list of all BindContexts that will need to be active when this route is active.
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
-
handler
→ Function?
-
final
-
hashCode
→ int
-
The hash code for this object.
no setterinherited
-
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
-
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
-
Current uri of the route.
finalinherited
Methods
-
addModule(String name, {required RouteContext module})
→ ModularRoute
-
Create a new Route by adding a RouteContext to the context.
inherited
-
copyWith({Handler? handler, String? name, String? schema, RouteContext? context, List<Middleware>? middlewares, List<ModularRoute>? children, String? parent, Uri? uri, Map<ModularKey, ModularRoute>? routeMap, Map<Type, BindContext>? bindContextEntries})
→ Route
-
-
noSuchMethod(Invocation invocation)
→ dynamic
-
Invoked when a nonexistent method or property is accessed.
inherited
-
toString()
→ String
-
A string representation of this object.
inherited