Type class Null safety
Runtime representation of a type.
Type objects represent types. A type object can be created in several ways:
- By a type literal, a type name occurring as an expression,
Type type = int;, or a type variable occurring as an expression, like
Type type = T;.
- By reading the run-time type of an object,
Type type = o.runtimeType;.
A type object is intended as an entry point for using
The only operations supported are comparing to other type objects
for equality, and converting it to a string for debugging.
- hashCode → int
A hash code for the type which is compatible with operator==.
- runtimeType → Type
A representation of the runtime type of the object.
Invocation invocation) → dynamic
Invoked when a non-existent method or property is accessed.
) → String
Returns a string which represents the underlying type.
Object other) → bool
otheris a Type instance representing an equivalent type.override