launchSmoothApp function
Future<void>
launchSmoothApp({ - required Scanner barcodeScanner,
- required AppStore appStore,
- required StoreLabel storeLabel,
- required ScannerLabel scannerLabel,
- bool screenshots = false,
})
Implementation
Future<void> launchSmoothApp({
required Scanner barcodeScanner,
required AppStore appStore,
required StoreLabel storeLabel,
required ScannerLabel scannerLabel,
bool screenshots = false,
}) async {
_screenshots = screenshots;
GlobalVars.barcodeScanner = barcodeScanner;
GlobalVars.appStore = appStore;
GlobalVars.storeLabel = storeLabel;
GlobalVars.scannerLabel = scannerLabel;
if (_screenshots) {
await _init1();
runApp(const SmoothApp());
return;
}
final WidgetsBinding widgetsBinding =
WidgetsFlutterBinding.ensureInitialized();
await RiveNative.init();
FlutterNativeSplash.preserve(widgetsBinding: widgetsBinding);
_enableEdgeToEdgeMode();
if (kReleaseMode) {
await AnalyticsHelper.initSentry(
appRunner: () => runApp(const SmoothApp()),
);
} else {
runApp(const SmoothApp());
}
}