From 1bedf30eb46c2fbef4d765c0140b72ac79cbad5c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Louis-Philippe=20He=CC=81on?= Date: Sun, 10 Nov 2024 23:48:57 -0500 Subject: [PATCH 1/4] edge to edge --- lib/features/app/widgets/base_scaffold.dart | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/lib/features/app/widgets/base_scaffold.dart b/lib/features/app/widgets/base_scaffold.dart index 2e572215f..8ca903993 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: @@ -85,6 +86,17 @@ class _BaseScaffoldState extends State { }); } + Future redoSystemStyle() async { + SystemChrome.setSystemUIOverlayStyle(const SystemUiOverlayStyle( + systemNavigationBarColor: Colors.transparent, + systemNavigationBarContrastEnforced: false, + systemNavigationBarIconBrightness: Brightness.dark, + statusBarColor: Colors.transparent, + statusBarBrightness: Brightness.light, + statusBarIconBrightness: Brightness.dark, + )); + } + @override Widget build(BuildContext context) => Scaffold( body: Scaffold( @@ -106,6 +118,8 @@ class _BaseScaffoldState extends State { ); Widget bodyPortraitMode() { + SystemChrome.setEnabledSystemUIMode(SystemUiMode.edgeToEdge); + return SafeArea( top: false, bottom: widget._safeArea, @@ -124,6 +138,8 @@ class _BaseScaffoldState extends State { } Widget bodyLandscapeMode() { + SystemChrome.setEnabledSystemUIMode(SystemUiMode.leanBack); + return Stack( children: [ Row( From 0e1069fcbdb52aac8d153eb015c47354d354610a Mon Sep 17 00:00:00 2001 From: LouisPhilippeHeon Date: Mon, 11 Nov 2024 04:55:51 +0000 Subject: [PATCH 2/4] [BOT] Applying version. --- pubspec.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pubspec.yaml b/pubspec.yaml index 0d8cfa01c..e20ee2a63 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.0 +version: 4.55.0 environment: sdk: '>=3.3.0 <4.0.0' From 0775c24dfc325c8e34fb68ccd516c9d81a7a1361 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Louis-Philippe=20He=CC=81on?= Date: Mon, 11 Nov 2024 13:43:24 -0500 Subject: [PATCH 3/4] fix --- lib/features/app/widgets/base_scaffold.dart | 11 ----------- lib/main.dart | 13 +++++++++++++ 2 files changed, 13 insertions(+), 11 deletions(-) diff --git a/lib/features/app/widgets/base_scaffold.dart b/lib/features/app/widgets/base_scaffold.dart index 8ca903993..a4a254871 100644 --- a/lib/features/app/widgets/base_scaffold.dart +++ b/lib/features/app/widgets/base_scaffold.dart @@ -85,17 +85,6 @@ class _BaseScaffoldState extends State { }); }); } - - Future redoSystemStyle() async { - SystemChrome.setSystemUIOverlayStyle(const SystemUiOverlayStyle( - systemNavigationBarColor: Colors.transparent, - systemNavigationBarContrastEnforced: false, - systemNavigationBarIconBrightness: Brightness.dark, - statusBarColor: Colors.transparent, - statusBarBrightness: Brightness.light, - statusBarIconBrightness: Brightness.dark, - )); - } @override Widget build(BuildContext context) => Scaffold( diff --git a/lib/main.dart b/lib/main.dart index 2d239e31a..7fc7b2b80 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'; @@ -57,6 +58,17 @@ Future main() async { } 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, + )); + } + /// Manage the settings final SettingsManager settingsManager; @@ -64,6 +76,7 @@ class ETSMobile extends StatelessWidget { @override Widget build(BuildContext context) { + addEdgeToEdgeEffect(); final RemoteConfigService remoteConfigService = locator(); final bool outage = remoteConfigService.outage; From fcb42d03e6344e7029ba96716d0a5bcc9a43ef2a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Louis-Philippe=20He=CC=81on?= Date: Mon, 11 Nov 2024 13:50:56 -0500 Subject: [PATCH 4/4] requested changes --- lib/main.dart | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/lib/main.dart b/lib/main.dart index 7fc7b2b80..46c1748dc 100644 --- a/lib/main.dart +++ b/lib/main.dart @@ -58,17 +58,6 @@ Future main() async { } 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, - )); - } - /// Manage the settings final SettingsManager settingsManager; @@ -124,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, + )); + } }