Named class

Used to register a dependency under a name instead of type also used to annotated named injected dependencies in constructors

Annotations
  • @Target({TargetKind.classType, TargetKind.parameter, TargetKind.method, TargetKind.getter})

Constructors

Named(String? name)
default constructor
const
Named.from(Type? type)
A named constrictor to extract name for type
const

Properties

hashCode int
The hash code for this object.
no setterinherited
name String?
The name in which an instance is registered
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
type Type?
instead of providing a literal name you can pass a type, and its name will be extracted in during generation
final

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