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 value is a list.
isMap(dynamic value) → bool
Checks if value is a map.
isNumeric(dynamic value) → bool
Checks if value is a numeric type (int or double).
isType(dynamic value, Type type) → bool
Checks whether value is of type type.
nullable<T>(T? id) → bool
Checks if value is null.
of<T>(dynamic value) → bool
Checks whether value is of type T.
toBoolean<T>(T? value) → bool
Converts a dynamic value into a boolean.
valueOf(dynamic value) → String
Converts value to a string.