From 9e96f579d96745fa8b9e9b9882d74ee1e195892e Mon Sep 17 00:00:00 2001 From: Vadim <44135514+vodemn@users.noreply.github.com> Date: Sat, 26 Nov 2022 22:42:21 +0300 Subject: [PATCH] fixed system overlays color --- lib/main.dart | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/lib/main.dart b/lib/main.dart index 3880f69..12546a7 100644 --- a/lib/main.dart +++ b/lib/main.dart @@ -1,4 +1,5 @@ import 'package:flutter/material.dart'; +import 'package:flutter/services.dart'; import 'package:flutter_bloc/flutter_bloc.dart'; import 'package:flutter_localizations/flutter_localizations.dart'; import 'package:lightmeter/screens/settings/settings_page_route_builder.dart'; @@ -31,6 +32,13 @@ class _ApplicationState extends State with TickerProviderStateMixin @override void initState() { super.initState(); + final mySystemTheme = SystemUiOverlayStyle.light.copyWith( + statusBarColor: lightColorScheme.surface, + statusBarBrightness: Brightness.light, + statusBarIconBrightness: Brightness.dark, + systemNavigationBarColor: lightColorScheme.surface, + ); + SystemChrome.setSystemUIOverlayStyle(mySystemTheme); // 0 - collapsed // 1 - expanded _animationController = AnimationController(