changeId method
Sets the user's id and various values.
Executing this function will discard the current values of User.properties.
With overrideId, you can override the id value in any Type.
Overridden values can be retrieved using getIdFor.
With overrideProperties, you can override property values in any Type.
Overridden values can be retrieved using getPropertiesFor.
Implementation
Future<void> changeId(
String? id, {
Map<String, Object?>? properties,
Map<String, Object?>? data,
Map<Type, String?>? overrideId,
Map<Type, Map<String, Object?>>? overrideProperties,
}) async {
await lock((batch) async {
await changeIdWithBatch(
batch: batch,
id: id,
properties: properties,
data: data,
overrideId: overrideId,
overrideProperties: overrideProperties,
);
batch.commit();
}, lockKey: _key);
}