runNUIApp function

void runNUIApp(
  1. NUIApp app, {
  2. NUIAppCrashHandler? crashHandler,
})

Implementation

void runNUIApp(NUIApp app, {NUIAppCrashHandler? crashHandler}){
  runZonedGuarded<Future<void>>(() async {
    runApp(app);
  }, (Object error, StackTrace stackTrace) {
    if(crashHandler != null) crashHandler(error, stackTrace);
  });
  FlutterError.onError = (FlutterErrorDetails details){
    Zone.current.handleUncaughtError(details.exception, details.stack!);
  };
}