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,31 +40,40 @@ class Fromis9App extends StatelessWidget {
@override
Widget build(BuildContext context) {
return MaterialApp.router(
title: 'fromis_9',
debugShowCheckedModeBanner: false,
theme: ThemeData(
useMaterial3: true,
colorScheme: ColorScheme.fromSeed(
seedColor: AppColors.primary,
brightness: Brightness.light,
),
scaffoldBackgroundColor: AppColors.background,
appBarTheme: const AppBarTheme(
backgroundColor: Colors.white,
foregroundColor: AppColors.textPrimary,
elevation: 0,
scrolledUnderElevation: 1,
centerTitle: true,
titleTextStyle: TextStyle(
color: AppColors.primary,
fontSize: 20,
fontWeight: FontWeight.bold,
),
),
fontFamily: 'Pretendard',
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(
useMaterial3: true,
colorScheme: ColorScheme.fromSeed(
seedColor: AppColors.primary,
brightness: Brightness.light,
),
scaffoldBackgroundColor: AppColors.background,
appBarTheme: const AppBarTheme(
backgroundColor: Colors.white,
foregroundColor: AppColors.textPrimary,
elevation: 0,
scrolledUnderElevation: 1,
centerTitle: true,
titleTextStyle: TextStyle(
color: AppColors.primary,
fontSize: 20,
fontWeight: FontWeight.bold,
),
),
fontFamily: 'Pretendard',
),
routerConfig: appRouter,
),
routerConfig: appRouter,
);
}
}