improved performance and battery usage on older devices
This commit is contained in:
@@ -0,0 +1,7 @@
|
||||
import 'dart:convert';
|
||||
|
||||
/// Content equality for API models that define no `==` but serialise to JSON.
|
||||
/// Comparing the encoded strings is cheaper than a deep map walk and treats
|
||||
/// both sides identically (same `toJson`, same field order).
|
||||
bool sameJson(Object? a, Object? b) =>
|
||||
a != null && b != null && jsonEncode(a) == jsonEncode(b);
|
||||
Reference in New Issue
Block a user