Skip to content

v1.0.3 — Fix black screen on launch

Latest

Choose a tag to compare

@chinmayrozekar chinmayrozekar released this 09 May 04:22

Bug Fix: Black Screen on Launch (Real Devices)

What was happening

Several users reported seeing a permanent black screen when launching the app on physical Android devices, while the app worked fine on emulators.

Root Cause

During startup, the app calls NotificationService.init() before runApp() is invoked. Inside that init, FlutterTimezone.getLocalTimezone() makes a platform call to retrieve the device's local timezone. On certain real devices — particularly those running custom ROMs, Android Go editions, or older Android versions — this call throws an unhandled exception.

Because the crash happened before a single frame was ever rendered, Flutter had nothing to fall back to, resulting in a permanent black screen with no visible error.

Emulators always grant this call successfully, which is why the bug never appeared during development.

What was fixed

  • main.dart: Wrapped NotificationService.init() in a try-catch so any failure during notification setup cannot block the app from launching.
  • notification_service.dart: Added an inner try-catch around FlutterTimezone.getLocalTimezone() with a UTC fallback — scheduled reminders will still work, just anchored to UTC if the device timezone cannot be resolved.

Install

Download and install app-release.apk directly on your Android device.