Instance class final
A utility class for type checking, similar to Java's instanceof.
It also provides additional methods for type checking.
Constructors
- Instance()
-
A utility class for type checking, similar to Java's
instanceof. It also provides additional methods for type checking.
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
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
Static Methods
-
ambiguate<
T> (T? value) → T? - This allows a value of type T or T? to be treated as a value of type T?.
-
isList(
dynamic value) → bool -
Checks if
valueis a list. -
isMap(
dynamic value) → bool -
Checks if
valueis a map. -
isNumeric(
dynamic value) → bool -
Checks if
valueis a numeric type (intordouble). -
isType(
dynamic value, Type type) → bool -
Checks whether
valueis of typetype. -
nullable<
T> (T? id) → bool -
Checks if
valueis null. -
of<
T> (dynamic value) → bool -
Checks whether
valueis of typeT. -
toBoolean<
T> (T? value) → bool - Converts a dynamic value into a boolean.
-
valueOf(
dynamic value) → String -
Converts
valueto a string.