replacingTimestamp function

  1. @Deprecated('Use UnionTimestamp instead.')
JsonMap replacingTimestamp({
  1. required JsonMap json,
})

Implementation

@Deprecated('Use UnionTimestamp instead.')
JsonMap replacingTimestamp({
  required JsonMap json,
}) =>
    <String, dynamic>{
      ...json,
      if (json[TimestampField.createdAt] == null)
        TimestampField.createdAt: FieldValue.serverTimestamp(),
      TimestampField.updatedAt: FieldValue.serverTimestamp(),
    };