areIdentical method

  1. @override
bool areIdentical(
  1. dynamic a,
  2. dynamic b
)
override

Whether the two items being compared have the same identity, for example two records with the same primary key. This check is used to determine if an item should be removed or added to a list, rather than updated.

The areEqual check is used to determine if the item has changed.

Implementation

@override
bool areIdentical(a, b) {
  if (a is Diffable) {
    return a.diffIdentical(b);
  } else if (b is Diffable) {
    return b.diffIdentical(a);
  }
  return fallbackIdentity.equals(a, b);
}