update method

  1. @visibleForTesting
  2. @protected
  3. @override
Future<void> update(
  1. FutureOr<M> update(
    1. M old
    ), {
  2. dynamic onError(
    1. Object e,
    2. StackTrace s
    )?,
  3. int slowlyMs = 100,
  4. Object? debounceTag,
  5. Object? throttleTag,
})
override

执行一个异步操作, 并更新状态 不建议对本方法进行二次包装, 因此返回值强制为 void

Implementation

@visibleForTesting
@protected
@override
Future<void> update(
  FutureOr<M> Function(M old) update, {
  Function(Object e, StackTrace s)? onError,
  int slowlyMs = 100,
  Object? debounceTag,
  Object? throttleTag,
}) => super.update(
  update,
  onError: onError,
  slowlyMs: slowlyMs,
  debounceTag: debounceTag,
  throttleTag: throttleTag,
);