Extract class final

Binds a handler parameter to a custom extractor.

The argument is the extractor type, not an instance. Dust emits const MyExtractor().extract(request) and casts the result to the parameter's type, so the analyzer catches an extractor that produces something else.

Future<Todo> create(@Extract(TodosWrite) AuthUser user, @Body() CreateTodo input);
Annotations
  • @Target.new({TargetKind.parameter})

Constructors

Extract(Type extractor)
Binds the parameter to extractor.
const

Properties

extractor Type
The extractor type, which must implement FromRequestParts<T> and expose a zero-argument const constructor.
final
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