update method
执行一个异步操作, 并更新状态 不建议对本方法进行二次包装, 因此返回值强制为 void
Implementation
Future<void> update(
FutureOr<T> Function(T old) update, {
Function(Object e, StackTrace s)? onError,
int slowlyMs = 100,
Object? debounceTag,
Object? throttleTag,
}) async => await updateRaw(
(old) => update(old),
onError: onError,
slowlyMs: slowlyMs,
debounceTag: debounceTag,
throttleTag: throttleTag,
);