save method

  1. @override
Future<LCUser> save({
  1. bool fetchWhenSave = false,
  2. LCQuery<LCObject>? query,
})
override

Saves the object to the cloud.

Can also specify whether to fetchWhenSave, or only saving the object when it matches the query.

Implementation

@override
Future<LCUser> save(
    {bool fetchWhenSave = false, LCQuery<LCObject>? query}) async {
  await super.save(fetchWhenSave: fetchWhenSave, query: query);
  _currentUser = this;
  await _saveToLocal();
  return this;
}