isEqualsAsString function

bool isEqualsAsString(
  1. Object? o1,
  2. Object? o2
)

Returns true if o1 and o2 are equals as String. Uses String.toString to check.

Implementation

bool isEqualsAsString(Object? o1, Object? o2) {
  if (identical(o1, o2)) return true;
  if (o1 == o2) return true;
  if (o1 == null || o2 == null) return false;
  var s1 = o1.toString();
  var s2 = o2.toString();
  return s1 == s2;
}