operator == method

  1. @override
bool operator ==(
  1. Object other
)
override
Returns true if the passed object is also an ink list that contains the same items as the current list, false otherwise.

Implementation

@override
bool operator ==(Object other) {
  //if (other == null) return false;
  var otherRawList = other as InkList;
  if (otherRawList.length != length) return false;

  for (var kv in entries) {
    if (!otherRawList.containsKey(kv.key)) {
      return false;
    }
  }

  return true;
}