tryMutate method
Implementation
Future<R?> tryMutate(FutureOr<R?> future, {bool append = false}) async {
if (_closed) {
throw const MutationClosedException();
}
try {
_mutateCallback = null;
_mutateAppendCallback = null;
_updateLoading(true);
final data = await future;
_updateData(data, append: append);
_updateInitialized();
return data;
} catch (e) {
_updateError(e);
rethrow;
} finally {
_updateLoading(false);
}
}