InjectionRequest class

Contains a list of the data required for a DI-enabled method to run.

This improves performance by removing the necessity to reflect a method every time it is requested.

Regular request handlers can also skip DI entirely, lowering response time and memory use.

Constructors

InjectionRequest()
InjectionRequest.constant({Map<String, Type> named: const {}, List required: const [], List<String> optional: const [], Map<String, Parameter> parameters: const {}})
const

Properties

named → Map<String, Type>
Optional, typed data that can be passed to a DI-enabled method.
final
optional → List<String>
A list of the arguments that can be null in a DI-enabled method.
final
parameters → Map<String, Parameter>
Extended parameter definitions.
final
required → List
A list of the arguments required for a DI-enabled method to run.
final
hashCode → int
The hash code for this object.
read-only, inherited
runtimeType → Type
A representation of the runtime type of the object.
read-only, inherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a non-existent method or property is accessed.
inherited
toString() → String
Returns a string representation of this object.
inherited

Operators

operator ==(dynamic other) → bool
The equality operator.
inherited