init static method

Future<void> init({
  1. required Future<void> appRunner(),
})

Implementation

static Future<void> init({required Future<void> Function() appRunner}) async {
  LogDrop.crashTracker.init();
  LogDrop.networkLogger.init();

  // Run the app with error handling
  runZonedGuarded(
    () async {
      WidgetsFlutterBinding.ensureInitialized();
      await appRunner();
    },
    (error, stackTrace) async {
      await LogDrop.crashTracker.handleRunZoneGuardedError(error, stackTrace);
    },
  );
}