save method
Saves this model through a call equivalent to Repository.save.
Usage: await post.save()
, author.save(remote: false, params: {'a': 'x'})
.
Requires this model to be initialized.
Implementation
Future<T> save({
bool? remote,
Map<String, dynamic>? params,
Map<String, String>? headers,
OnData<T>? onSuccess,
OnDataError<T>? onError,
}) async {
_assertInit('save');
return await remoteAdapter.save(
this as T,
remote: remote,
params: params,
headers: headers,
onSuccess: onSuccess,
onError: onError,
);
}