TMapDiff class

A utility class for computing Firestore-friendly diffs between two map snapshots.

Returns a Firestore update()-ready map of dot-notation field paths representing the difference between before and after.

  • before null -> shallow copy of after
  • deeply equal -> {} (caller skips write)
  • nested maps -> flattened with dot notation (siblings preserved)
  • lists -> atomic replace if not deep-equal
  • removed keys -> FieldValue.delete() ONLY when includeDeletes is true

Constructors

TMapDiff()

Properties

hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited

Static Methods

diff({required Map<String, dynamic>? before, required Map<String, dynamic> after, bool includeDeletes = false}) Map<String, Object?>
Returns a Firestore update()-ready map of dot-notation field paths representing the difference between before and after.