exampleMainCrashlytics function

void exampleMainCrashlytics()

main() — Crashlytics REQUIRES Firebase first, so flag requiresFirebase: true (dreamic attaches it at the post-Firebase bootstrap step) and enableOnWeb: false (no web SDK). Under Path A′, web capture is owned by the Dart web-JS handler + a web-capable backend (e.g. Sentry); Crashlytics stays mobile.

Implementation

void exampleMainCrashlytics() async {
  /*
  // ensureInitialized() is the FIRST line INSIDE the guarded zone — the SAME zone
  // as runApp — or Flutter logs a "Zone mismatch" warning (runGuarded forks a child
  // runZonedGuarded zone). Use `() async { ... }` if your pre-runApp setup needs an
  // `await`.
  DreamicErrorHandling.runGuarded(() {
    WidgetsFlutterBinding.ensureInitialized();
    installEarlyErrorHandlers();

    configureErrorReporting(
      ErrorReportingConfig.customOnly(
        reporter: CrashlyticsErrorReporter(),
        requiresFirebase: true, // attach AFTER Firebase init (Crashlytics needs it)
        enableOnWeb: false,     // Crashlytics has no web support
      ),
    );

    runApp(DreamicAppInitHost(
      initFutureFactory: () => dreamicBootstrap(/* firebaseOptions, hooks, ... */),
      splash: const DreamicSplash(),
      child: const MyApp(),
    ));
  });
  */
}