loadInitial method

  1. @protected
Future<T> loadInitial()

Implementation

@protected
Future<T> loadInitial() {
  isReady.start();

  return internalFetchData().then((data) {
    this._internalUpdate(data);
    return data;
  }).catchError((Object e, StackTrace stack) {
    log.severe("Error fetching data for service: $e", e, stack);
    if (isReady.isNotStarted) isReady.start();
    isReady.completeError(e, stack);
    this.reset();
    throw e;
  });
}