compareKeyAndValue method
Compare the key
s of the map entries, if they are Comparable.
If the key
s are the same or not Comparable, then compare the values,
if they are Comparable.
If key
s and values are the same or not Comparable, return 0
.
Note: This is not called "compareTo
" as to not mislead people into thinking
MapEntry is Comparable.
See: Issue #32559 of the Dart SDK
and Issue #100 of Dart's Matchers.
Implementation
int compareKeyAndValue(MapEntry? other) => compareObject(this, other);