append method

void append(
  1. Future Function() body(), {
  2. String? errorMessage,
})
inherited

Implementation

void append(Future<T> Function() Function() body, {String? errorMessage}) {
  final compute = body();
  compute().then((newValue) {
    change(newValue, status: RxStatus.success());
  }, onError: (err) {
    change(state, status: RxStatus.error(errorMessage ?? err.toString()));
  });
}