mirror of
https://github.com/vodemn/m3_lightmeter.git
synced 2024-11-24 00:10:47 +00:00
[Android] Fixed system navigation bar color
This commit is contained in:
parent
e4deac0fee
commit
afdbc92ac4
3 changed files with 11 additions and 2 deletions
|
@ -1,11 +1,18 @@
|
|||
package com.vodemn.lightmeter
|
||||
|
||||
import android.os.Bundle
|
||||
import android.view.WindowManager
|
||||
import androidx.core.view.WindowCompat
|
||||
import io.flutter.embedding.android.FlutterActivity
|
||||
import io.flutter.embedding.engine.FlutterEngine
|
||||
import io.flutter.plugin.common.MethodChannel
|
||||
|
||||
class MainActivity : FlutterActivity() {
|
||||
override fun onCreate(savedInstanceState: Bundle?) {
|
||||
super.onCreate(savedInstanceState)
|
||||
WindowCompat.setDecorFitsSystemWindows(window, false)
|
||||
}
|
||||
|
||||
override fun configureFlutterEngine(flutterEngine: FlutterEngine) {
|
||||
super.configureFlutterEngine(flutterEngine)
|
||||
MethodChannel(
|
||||
|
|
|
@ -57,7 +57,7 @@ class Application extends StatelessWidget {
|
|||
? Brightness.dark
|
||||
: Brightness.light,
|
||||
statusBarIconBrightness: systemIconsBrightness,
|
||||
systemNavigationBarColor: context.watch<ThemeData>().colorScheme.surface,
|
||||
systemNavigationBarColor: Colors.transparent,
|
||||
systemNavigationBarIconBrightness: systemIconsBrightness,
|
||||
),
|
||||
child: MaterialApp(
|
||||
|
|
|
@ -25,6 +25,7 @@ class SettingsScreen extends StatelessWidget {
|
|||
return Scaffold(
|
||||
body: SafeArea(
|
||||
top: false,
|
||||
bottom: false,
|
||||
child: CustomScrollView(
|
||||
slivers: <Widget>[
|
||||
SliverAppBar(
|
||||
|
@ -51,7 +52,7 @@ class SettingsScreen extends StatelessWidget {
|
|||
),
|
||||
SliverList(
|
||||
delegate: SliverChildListDelegate(
|
||||
<SettingsSection>[
|
||||
<Widget>[
|
||||
SettingsSection(
|
||||
title: S.of(context).metering,
|
||||
children: const [
|
||||
|
@ -84,6 +85,7 @@ class SettingsScreen extends StatelessWidget {
|
|||
VersionListTile(),
|
||||
],
|
||||
),
|
||||
SizedBox(height: MediaQuery.of(context).padding.bottom),
|
||||
],
|
||||
),
|
||||
),
|
||||
|
|
Loading…
Reference in a new issue