Typed<T extends Object> 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
  • @optionalTypeArgs

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

hashCode int
The hash code for this object.
no setterinherited
on String?
An optional reference for targeting specific instances within a template.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
typeArguments List<Object>?
The generic type arguments of T, if not fully specified by T itself.
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