An abstract base class for creating strongly-typed route arguments.
Extend this class to create a custom arguments object for a route. You can override the validate method to add custom validation logic.
Example:
class ProfileScreenArgs extends RouteParams {
const ProfileScreenArgs({required this.userId});
final String userId;
@override
bool validate() => userId.isNotEmpty;
}
- Implementers
Constructors
- RouteParams()
-
const
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- 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
-
validate(
) → bool -
Validates the arguments. Returns
trueif the arguments are valid.
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited