append method

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

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()));
  });
}