FieldChange<T extends DocumentSerializable> constructor

const FieldChange<T extends DocumentSerializable>({
  1. required String fieldName,
  2. Object? oldValue,
  3. Object? newValue,
})

Creates a field change record.

fieldName must be non-empty and represent a valid field identifier. oldValue represents the state before modification (null for inserts). newValue represents the state after modification (null for deletes).

Implementation

const FieldChange({required this.fieldName, this.oldValue, this.newValue})
  : assert(fieldName != '', 'Field name cannot be empty');