loadView method

  1. @protected
FutureOr<void> loadView(
  1. FutureOr<void> load(), {
  2. String? readyReason,
  3. Iterable<IObservable<BaseEvent>>? readyChanges,
  4. Iterable<IObservable<BaseEvent>>? errorChanges,
})

Implementation

@protected
FutureOr<void> loadView(
  FutureOr<void> Function() load, {
  String? readyReason,
  Iterable<IObservable<BaseEvent>>? readyChanges,
  Iterable<IObservable<BaseEvent>>? errorChanges,
}) async {
  try {
    await load();

    ready(changes: readyChanges, reason: readyReason);
  } on Exception catch (e) {
    error(e, changes: errorChanges);
  }
}