Qualifier class

A reserved name that can be used alongside a provide annotation.

A Qualifier further specifies a provided dependency, and the annotation must be placed at the same level as a @provide annotation. It is illegal to have more than one Qualifier for a given provider.

Example:

const baseUri = const Qualifier(#baseUri);

abstract class RpcModule {
  @provide
  @baseUri
  String provideBaseUri() => 'https://foo.bar/service/v2';
}

The symbol #baseUri AND String are used to form the key in the dependency tree.

Constructors

Qualifier(Symbol name)
Create a named provider qualifier from name.
const
factory

Properties

hashCode int
The hash code for this object. [...]
read-only, inherited
name Symbol
Unique name of the identifier.
final
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
A string representation of this object. [...]
inherited

Operators

operator ==(Object other) bool
The equality operator. [...]
inherited