State class final
Binds a parameter to application state attached with withState.
The parameter's type selects the value, so nothing names a key on either side. This is how a library of top-level handlers gets what a controller class holds in a field.
@GET('/{id}')
Future<Note> read(@Path() String id, @State() NoteRepo repo) => repo.find(id);
- Annotations
-
- @Target.new({TargetKind.parameter})
Constructors
- State()
-
Reads the state matching the parameter's type.
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
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited