MockRoute class

A single route entry declared in mock.yaml.

Constructors

MockRoute({required String path, required String method, required MockResponse? response, required String? action, required String? store})
Creates a route with an HTTP method, path, and either a static response or a stateful action.

Properties

action → String?
Optional CRUD action for stateful routes.
final
hashCode → int
The hash code for this object.
no setterinherited
isStateful → bool
Returns true when the route is backed by a mutable in-memory store.
no setter
method → String
HTTP method for the route.
final
normalizedPath → String
Path normalized for runtime matching.
no setter
path → String
Raw route path as declared in YAML.
final
response → MockResponse?
Response configuration for the route.
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
store → String?
Optional backing store name for stateful routes.
final

Methods

matchPath(String requestPath) → Map<String, String>?
Matches a request path against the route path pattern.
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