loaderFuture property

Future<void> get loaderFuture

Implementation

Future<void> get loaderFuture => _loaderFuture ??= (() async {
  final game = currentGame;
  final gameGeneration = _gameGeneration;
  assert(game.hasLayout);
  await game.load();
  if (_isStale(gameGeneration)) {
    return;
  }
  game.mount();
  // Wait for the whole component tree to be loaded and mounted, so that
  // the game does not start, and the loading widget is not removed,
  // until every component added during the initial load is ready.
  await game.ready();
  if (_isStale(gameGeneration)) {
    return;
  }
  if (!game.isPaused) {
    game.update(0);
  }
})();