Skip to content

Commit

Permalink
edge to edge
Browse files Browse the repository at this point in the history
  • Loading branch information
LouisPhilippeHeon committed Nov 11, 2024
1 parent eb4e941 commit 1bedf30
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions lib/features/app/widgets/base_scaffold.dart
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down Expand Up @@ -85,6 +86,17 @@ class _BaseScaffoldState extends State<BaseScaffold> {
});
}

Future<void> 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(
Expand All @@ -106,6 +118,8 @@ class _BaseScaffoldState extends State<BaseScaffold> {
);

Widget bodyPortraitMode() {
SystemChrome.setEnabledSystemUIMode(SystemUiMode.edgeToEdge);

return SafeArea(
top: false,
bottom: widget._safeArea,
Expand All @@ -124,6 +138,8 @@ class _BaseScaffoldState extends State<BaseScaffold> {
}

Widget bodyLandscapeMode() {
SystemChrome.setEnabledSystemUIMode(SystemUiMode.leanBack);

return Stack(
children: [
Row(
Expand Down

0 comments on commit 1bedf30

Please sign in to comment.