deepEquals function

bool deepEquals(
  1. Object? a,
  2. Object? b
)

Whether two nullable collections are deeply equal.

Use for any collection field in a theme's ==; List and Map compare by identity otherwise, which would make two equal themes unequal and defeat updateShouldNotify.

Implementation

bool deepEquals(Object? a, Object? b) =>
    const DeepCollectionEquality().equals(a, b);