From 551bf128c6a67c1f964263419837a196ec4c118e Mon Sep 17 00:00:00 2001 From: zjs81 Date: Wed, 7 Oct 2026 21:01:53 -0700 Subject: [PATCH] Enable edge-to-edge on all Android versions and upgrade packages - Opt Android 14 and older into edge-to-edge so every version lays out the same way Android 15+ already enforces, and make the navigation bar transparent (its color is ignored on Android 15) - Raise minimum versions for packages with relevant fixes: flutter_blue_plus 2.3.14 (Android connection-state fixes), mobile_scanner 7.4.2 (scanner stall and camera-start crash fixes), flutter_map 8.3.2 (crash on NaN marker coordinates), flutter_onnxruntime 1.9.0 (ONNX Runtime 1.28), share_plus 13.3.1, flutter_cache_manager 3.4.5, flutter_local_notifications 22.3.1, package_info_plus 10.2.2 --- lib/main.dart | 14 ++++++++++---- pubspec.yaml | 16 ++++++++-------- 2 files changed, 18 insertions(+), 12 deletions(-) diff --git a/lib/main.dart b/lib/main.dart index 7162f67a..2014d5e3 100644 --- a/lib/main.dart +++ b/lib/main.dart @@ -49,6 +49,12 @@ void main() async { debugPrint = (String? message, {int? wrapWidth}) {}; } + // Android 15+ forces edge-to-edge for apps targeting SDK 35; opt older + // versions in too so every device lays out the same way under the bars. + if (PlatformInfo.isAndroid) { + await SystemChrome.setEnabledSystemUIMode(SystemUiMode.edgeToEdge); + } + // Initialize SharedPreferences cache await PrefsManager.initialize(); @@ -461,18 +467,18 @@ class _MeshCoreAppState extends State with WidgetsBindingObserver { SystemUiOverlayStyle _systemUiOverlayStyle(BuildContext context) { final theme = Theme.of(context); - final colorScheme = theme.colorScheme; final isDark = theme.brightness == Brightness.dark; final iconBrightness = isDark ? Brightness.light : Brightness.dark; - // Keep Android system bars aligned with the resolved Flutter theme. + // The app draws edge-to-edge, so both system bars stay transparent and + // only their icon brightness follows the resolved Flutter theme. return SystemUiOverlayStyle( statusBarColor: Colors.transparent, statusBarIconBrightness: iconBrightness, statusBarBrightness: isDark ? Brightness.dark : Brightness.light, - systemNavigationBarColor: colorScheme.surface, + systemNavigationBarColor: Colors.transparent, systemNavigationBarIconBrightness: iconBrightness, - systemNavigationBarDividerColor: colorScheme.surface, + systemNavigationBarDividerColor: Colors.transparent, systemNavigationBarContrastEnforced: false, ); } diff --git a/pubspec.yaml b/pubspec.yaml index a0411431..f1065222 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -37,7 +37,7 @@ dependencies: # The following adds the Cupertino Icons font to your application. # Use with the CupertinoIcons class for iOS style icons. cupertino_icons: ^1.0.8 - flutter_blue_plus: ^2.1.0 + flutter_blue_plus: ^2.3.14 # TODO: Switch to official flserial repo once changes are upstreamed flserial: git: @@ -47,18 +47,18 @@ dependencies: provider: ^6.1.5+1 shared_preferences: ^2.2.2 uuid: ^4.3.3 - flutter_map: ^8.2.2 + flutter_map: ^8.3.2 latlong2: ^0.9.1 - flutter_local_notifications: ^22.0.0 + flutter_local_notifications: ^22.3.1 crypto: ^3.0.3 pointycastle: ^4.0.0 http: ^1.2.0 cached_network_image: ^3.4.1 - flutter_cache_manager: ^3.4.1 + flutter_cache_manager: ^3.4.5 flutter_foreground_task: ^9.2.0 characters: ^1.4.0 - package_info_plus: ^10.1.0 - mobile_scanner: ^7.1.4 # QR/barcode scanning + package_info_plus: ^10.2.2 + mobile_scanner: ^7.4.2 # QR/barcode scanning image_picker: ^1.1.2 # Pick photos to send as compressed mesh images qr_flutter: ^4.1.0 # QR code generation url_launcher: ^6.3.0 # Launch URLs in system browser @@ -66,7 +66,7 @@ dependencies: gpx: ^2.3.0 path_provider: ^2.1.5 file_selector: ^1.0.3 # desktop save dialog for GPX export - share_plus: ^13.1.0 + share_plus: ^13.3.1 build_pipe: ^0.3.1 material_symbols_icons: ^4.2928.1 web: ^1.1.1 @@ -83,7 +83,7 @@ dependencies: # decoder (lib/services/image_codec_backend.dart). arm64-only on Android — see # the abiFilters note in android/app/build.gradle.kts; a universal APK pays # ~56 MB for ORT instead of ~18 MB. - flutter_onnxruntime: ^1.8.3 + flutter_onnxruntime: ^1.9.0 base32: ^2.2.0 hooks: