Flutter 앱: 시스템 네비게이션 바 흰색으로 변경

This commit is contained in:
caadiq 2026-01-12 22:35:40 +09:00
parent 168da7d61e
commit bf6d4567a3
3 changed files with 42 additions and 25 deletions

View file

@ -5,6 +5,7 @@
<!-- Show a splash screen on the activity. Automatically removed when
the Flutter engine draws its first frame -->
<item name="android:windowBackground">@drawable/launch_background</item>
<item name="android:navigationBarColor">@android:color/white</item>
</style>
<!-- Theme applied to the Android Window as soon as the process has started.
This theme determines the color of the Android Window while your
@ -14,5 +15,6 @@
This Theme is only used starting with V2 of Flutter's Android embedding. -->
<style name="NormalTheme" parent="@android:style/Theme.Black.NoTitleBar">
<item name="android:windowBackground">?android:colorBackground</item>
<item name="android:navigationBarColor">@android:color/white</item>
</style>
</resources>

View file

@ -5,6 +5,7 @@
<!-- Show a splash screen on the activity. Automatically removed when
the Flutter engine draws its first frame -->
<item name="android:windowBackground">@drawable/launch_background</item>
<item name="android:navigationBarColor">@android:color/white</item>
</style>
<!-- Theme applied to the Android Window as soon as the process has started.
This theme determines the color of the Android Window while your
@ -14,5 +15,6 @@
This Theme is only used starting with V2 of Flutter's Android embedding. -->
<style name="NormalTheme" parent="@android:style/Theme.Light.NoTitleBar">
<item name="android:windowBackground">?android:colorBackground</item>
<item name="android:navigationBarColor">@android:color/white</item>
</style>
</resources>

View file

@ -16,11 +16,15 @@ import 'core/constants.dart';
void main() {
WidgetsFlutterBinding.ensureInitialized();
//
//
SystemChrome.setSystemUIOverlayStyle(
const SystemUiOverlayStyle(
//
statusBarColor: Colors.transparent,
statusBarIconBrightness: Brightness.dark,
// ()
systemNavigationBarColor: Colors.white,
systemNavigationBarIconBrightness: Brightness.dark,
),
);
@ -36,7 +40,15 @@ class Fromis9App extends StatelessWidget {
@override
Widget build(BuildContext context) {
return MaterialApp.router(
return AnnotatedRegion<SystemUiOverlayStyle>(
value: const SystemUiOverlayStyle(
statusBarColor: Colors.transparent,
statusBarIconBrightness: Brightness.dark,
systemNavigationBarColor: Colors.white,
systemNavigationBarIconBrightness: Brightness.dark,
systemNavigationBarDividerColor: Colors.transparent,
),
child: MaterialApp.router(
title: 'fromis_9',
debugShowCheckedModeBanner: false,
theme: ThemeData(
@ -61,6 +73,7 @@ class Fromis9App extends StatelessWidget {
fontFamily: 'Pretendard',
),
routerConfig: appRouter,
),
);
}
}