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
This commit is contained in:
zjs81 committed 2026-10-07 21:01:53 -07:00
1 parent b58cb6e55b
commit 551bf128c6
2 files changed
+18 -12

No files matched your search

+10 -4
View File
@@ -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<MeshCoreApp> 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,
);
}