operator == method

  1. @override
bool operator ==(
  1. Object obj
)
override

Two units are considered equal if their conversions to MKS are equal and they have the same singular name.

Implementation

@override
bool operator ==(Object obj) {
  if (identical(this, obj)) return true;

  if (obj is Units) {
    return singular == obj.singular && convToMKS == obj.convToMKS;
  }
  return false;
}