PageArgSpec class

Describes one argument a generated *Args class reads from route arguments.

The generator emits a static const argSpecs list of these next to tryParse, so tools can build or validate arguments without repeating the keys and types by hand.

Constructors

PageArgSpec(String key, PageArgKind kind, {bool isRequired = false, Object? defaultValue, List<Enum> options = const []})
Creates a description of the argument stored under key.
const

Properties

defaultValue → Object?
The constructor default of the parameter, or null without one.
final
hashCode → int
The hash code for this object.
no setterinherited
isRequired → bool
Whether the page needs a value: the parameter is required, non-nullable, has no default and is not a PageArgKind.flag.
final
key → String
The argument key: the constructor parameter name in kebab-case.
final
kind → PageArgKind
How the argument value is written.
final
options → List<Enum>
The values a PageArgKind.choice argument accepts.
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