compareKeyAndValue method

int compareKeyAndValue(
  1. MapEntry? other
)

Compare the keys of the map entries, if they are Comparable. If the keys are the same or not Comparable, then compare the values, if they are Comparable. If keys 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);