Object class Null safety
The base class for all Dart objects exception null
.
Because Object
is a root of the non-nullable Dart class hierarchy,
every other non-Null
Dart class is a subclass of Object
.
When you define a class, you should consider overriding toString to return a string describing an instance of that class. You might also need to define hashCode and operator ==, as described in the Implementing map keys section of the library tour.
Constructors
Properties
- hashCode → int
-
The hash code for this object. [...]
read-only
- runtimeType → Type
-
A representation of the runtime type of the object.
read-only
Methods
-
noSuchMethod(
Invocation invocation) → dynamic - Invoked when a non-existent method or property is accessed. [...]
-
toString(
) → String - A string representation of this object. [...]
Operators
-
operator ==(
Object other) → bool - The equality operator. [...]