isEquivalent static method
Returns true if a and b are equivalent — that is, identical,
both null, equal, or of the same runtime type.
Implementation
static bool isEquivalent(Object? a, Object? b) {
return identical(a, b) ||
(a == null && b == null) ||
(a != null &&
b != null &&
((a == b) || (a.runtimeType == b.runtimeType)));
}