append method Null safety

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

    Implementation

    void append(Future<T> 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()));
      });
    }