run method

Future<void> run([
  1. void appRunner(
    1. Widget widget
    )?
])

Runs the app.

Implementation

Future<void> run([void Function(Widget widget)? appRunner]) async {
  await _boot();

  // Not run in a guarded zone when testing.
  if (_isTesting) {
    runApp(widget);
    return;
  }

  ErrorHandler(errorListeners).run(() {
    if (appRunner != null) {
      appRunner(widget);
      return;
    }
    runApp(widget);
  });
}