Object class - dart:core library (original) (raw)

The base class for all Dart objects except 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 toStringto return a string describing an instance of that class. You might also need to define hashCode and operator ==, as described in theImplementing map keyssection of the library tour.

Implementers

Constructors

Object()

Creates a new Object instance.

const

Properties

hashCodeint

The hash code for this object.

no setter

runtimeTypeType

A representation of the runtime type of the object.

no setter

Methods

noSuchMethod(Invocation invocation)→ dynamic

Invoked when a nonexistent method or property is accessed.

toString()→ String

A string representation of this object.

Operators

operator ==(Object other)→ bool

The equality operator.

Static Methods

hash(Object? object1, Object? object2, [Object? object3 = sentinelValue, Object? object4 = sentinelValue, Object? object5 = sentinelValue, Object? object6 = sentinelValue, Object? object7 = sentinelValue, Object? object8 = sentinelValue, Object? object9 = sentinelValue, Object? object10 = sentinelValue, Object? object11 = sentinelValue, Object? object12 = sentinelValue, Object? object13 = sentinelValue, Object? object14 = sentinelValue, Object? object15 = sentinelValue, Object? object16 = sentinelValue, Object? object17 = sentinelValue, Object? object18 = sentinelValue, Object? object19 = sentinelValue, Object? object20 = sentinelValue])→ int

Creates a combined hash code for a number of objects.

hashAll(Iterable<Object?> objects)→ int

Creates a combined hash code for a sequence of objects.

hashAllUnordered(Iterable<Object?> objects)→ int

Creates a combined hash code for a collection of objects.