diff --git a/lib/features/app/widgets/base_scaffold.dart b/lib/features/app/widgets/base_scaffold.dart index 2e572215f..a4a254871 100644 --- a/lib/features/app/widgets/base_scaffold.dart +++ b/lib/features/app/widgets/base_scaffold.dart @@ -6,6 +6,7 @@ import 'package:flutter/material.dart'; // Package imports: import 'package:connectivity_plus/connectivity_plus.dart'; +import 'package:flutter/services.dart'; import 'package:flutter_gen/gen_l10n/app_localizations.dart'; // Project imports: @@ -84,7 +85,7 @@ class _BaseScaffoldState extends State { }); }); } - + @override Widget build(BuildContext context) => Scaffold( body: Scaffold( @@ -106,6 +107,8 @@ class _BaseScaffoldState extends State { ); Widget bodyPortraitMode() { + SystemChrome.setEnabledSystemUIMode(SystemUiMode.edgeToEdge); + return SafeArea( top: false, bottom: widget._safeArea, @@ -124,6 +127,8 @@ class _BaseScaffoldState extends State { } Widget bodyLandscapeMode() { + SystemChrome.setEnabledSystemUIMode(SystemUiMode.leanBack); + return Stack( children: [ Row( diff --git a/lib/main.dart b/lib/main.dart index 2d239e31a..46c1748dc 100644 --- a/lib/main.dart +++ b/lib/main.dart @@ -9,6 +9,7 @@ import 'package:calendar_view/calendar_view.dart'; import 'package:feedback/feedback.dart'; import 'package:firebase_core/firebase_core.dart'; import 'package:firebase_crashlytics/firebase_crashlytics.dart'; +import 'package:flutter/services.dart'; import 'package:flutter_gen/gen_l10n/app_localizations.dart'; import 'package:flutter_localizations/flutter_localizations.dart'; import 'package:provider/provider.dart'; @@ -64,6 +65,7 @@ class ETSMobile extends StatelessWidget { @override Widget build(BuildContext context) { + addEdgeToEdgeEffect(); final RemoteConfigService remoteConfigService = locator(); final bool outage = remoteConfigService.outage; @@ -111,4 +113,15 @@ class ETSMobile extends StatelessWidget { }), ); } + + void addEdgeToEdgeEffect() { + SystemChrome.setSystemUIOverlayStyle(const SystemUiOverlayStyle( + systemNavigationBarColor: Colors.transparent, + systemNavigationBarContrastEnforced: false, + systemNavigationBarIconBrightness: Brightness.dark, + statusBarColor: Colors.transparent, + statusBarBrightness: Brightness.light, + statusBarIconBrightness: Brightness.dark, + )); + } } diff --git a/pubspec.yaml b/pubspec.yaml index 62d2e5c60..85cebb212 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -5,7 +5,7 @@ description: The 4th generation of ÉTSMobile, the main gateway between the Éco # pub.dev using `pub publish`. This is preferred for private packages. publish_to: 'none' # Remove this line if you wish to publish to pub.dev -version: 4.54.1 +version: 4.55.0 environment: sdk: '>=3.3.0 <4.0.0'