Typed<T> class

Declares a typed directive or defines type argument of type T.

Example uses include:

  • Single concrete type argument:
    • Typed<Foo<String>>().
  • Multiple, nested concrete type arguments:
    • Typed<Bar<String, List<int>>>().
  • Generic type parameter type argument:
    • Typed<Baz>.of([#T])
  • Mixed, nested type arguments:
    • Typed<Qux>.of([String, Typed<List>.of([#T])

See documentation of each constructor for more details.

Annotations
  • @experimental

Constructors

Typed({String on })
A shorthand constructor for a type with concrete type arguments. [...]
const
Typed.of(List<Object> typeArguments, { String on })
A constructor for a type with any type parameters as type arguments. [...]
const

Properties

on → String
An optional reference for targeting specific instances within a template. [...]
final
typeArguments → List<Object>
The generic type arguments of T, if not fully specified by T itself. [...]
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