Path class

Annotation to define a path parameter mapping.

@Route('users/:userId')
abstract class UserRoute with _$UserRoute {
  const factory UserRoute({
    @Path('userId') required String id,
  }) = _UserRoute;
}
Annotations

Constructors

Path([String? name])
Creates a Path annotation with the (optional) given name.
const

Properties

hashCode int
The hash code for this object.
no setterinherited
name String?
The name of the path parameter in the template. If null, the field name is used.
final
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
toString() String
A string representation of this object.
inherited

Operators

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