equals method

bool equals(
  1. Object? other
)

Implementation

bool equals(Object? other) {
  final thisList = buffer.asUint8List();
  Uint8List otherList;
  if (other is ByteData) {
    otherList = other.buffer.asUint8List();
  } else if (other is List<int>) {
    otherList = Uint8List.fromList(other);
  } else {
    return false;
  }
  if (thisList.length != otherList.length) return false;
  return !IterableZip([thisList, otherList])
      .any((element) => element[0] != element[1]);
}