6177214e-ce7c-49e3-99de-ff9721b26f63 — Commit dff55ece

AuthorMikkel Thygesen<mikkelet@gmail.com>
Date2026-03-17 16:34:17 +0100
added prints to help debug main

Changed files

comwell_key_app/lib/main.dart | 19 +++++++++++++------
 1 file changed, 13 insertions(+), 6 deletions(-)

Diff

diff --git a/comwell_key_app/lib/main.dart b/comwell_key_app/lib/main.dart
index 1f89f612..ec0ccf4f 100644
--- a/comwell_key_app/lib/main.dart
+++ b/comwell_key_app/lib/main.dart
@@ -15,8 +15,10 @@ import 'comwell_app.dart';
import 'package:payment_plugin/payment_plugin.dart';
void main() async {
+ print("step 0");
F.appFlavor = Flavor.values.firstWhere((f) => f.name == appFlavor?.toLowerCase());
await AppLocalizations.delegate.load(const Locale("en"));
+ print("step 1");
WidgetsFlutterBinding.ensureInitialized();
print("Current flavor: $appFlavor");
@@ -24,14 +26,19 @@ void main() async {
switch (appFlavor?.toLowerCase()) {
case "develop":
await dotenv.load(fileName: 'env/.dev.env');
+ print("step 2");
case "stage":
await dotenv.load(fileName: 'env/.stage.env');
+ print("step 3");
case "prod":
await dotenv.load(fileName: 'env/.prod.env');
+ print("step 4");
}
print("Successfully loaded environment file");
await configureFirebase();
+ print("step 5");
await SystemChrome.setPreferredOrientations([DeviceOrientation.portraitUp]);
+ print("step 6");
setupLocator();
await SentryFlutter.init((options) {
@@ -40,15 +47,15 @@ void main() async {
options.profilesSampleRate = 1.0;
options.environment = appFlavor;
});
+ print("step 7");
await locator<ComwellPreferences>().init();
+ print("step 8");
await locator<MSALService>().init();
+ print("step 9");
- await PaymentPlugin.initialize(
- config: PaymentConfig(
- dio: locator.get<ComwellHttpClient>().dio,
- ),
- );
+ await PaymentPlugin.initialize(config: PaymentConfig(dio: locator.get<ComwellHttpClient>().dio,),);
+ print("step 10");
// Setting System UI overlay
SystemChrome.setSystemUIOverlayStyle(
@@ -64,7 +71,7 @@ void main() async {
),
);
} catch (e, st) {
- debugPrint("Error init app: $e");
+ print("Error init app: $e");
if (!kDebugMode) Sentry.captureException(e, stackTrace: st);
rethrow;
}