Skip to content

Commit 83c18aa

Browse files
committed
fix: fix scaffold & dialog background color
Material 3 migration
1 parent f31d8af commit 83c18aa

File tree

8 files changed

+18
-1
lines changed

8 files changed

+18
-1
lines changed

lib/features/achieved/view/achieved_page.dart

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,10 @@ class AchievedPage extends StatelessWidget {
66

77
@override
88
Widget build(BuildContext context) {
9-
return const AchievedScreen();
9+
ThemeData theme = Theme.of(context);
10+
return Scaffold(
11+
backgroundColor: theme.colorScheme.surface,
12+
body: const AchievedScreen(),
13+
);
1014
}
1115
}

lib/features/achieved_detail/view/achieved_detail_screen.dart

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ class AchievedDetailScreen extends StatelessWidget {
99
Widget build(BuildContext context) {
1010
ThemeData theme = Theme.of(context);
1111
return Scaffold(
12+
backgroundColor: theme.colorScheme.surface,
1213
appBar: AppBar(
1314
title: BlocBuilder<AchievedDetailCubit, AchievedDetailState>(
1415
builder: (context, state) {
@@ -62,8 +63,10 @@ class AchievedDetailScreen extends StatelessWidget {
6263
}
6364

6465
Widget _showDeleteWishDialog(BuildContext context) {
66+
ThemeData theme = Theme.of(context);
6567
return AlertDialog(
6668
shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(20)),
69+
backgroundColor: theme.colorScheme.surface,
6770
title: const Text('Hapus tabungan?', style: TextStyle(fontSize: 24, fontWeight: FontWeight.normal)),
6871
actions: [
6972
TextButton(

lib/features/add_wish/view/add_wish_page.dart

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@ class _AddWishView extends StatelessWidget {
4444
GlobalKey<FormState> formKey = GlobalKey<FormState>();
4545

4646
return Scaffold(
47+
backgroundColor: theme.colorScheme.surface,
4748
appBar: AppBar(
4849
elevation: 0,
4950
backgroundColor: Colors.transparent,

lib/features/home/view/home_screen.dart

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -87,8 +87,10 @@ class _HomeScreenState extends State<HomeScreen> with SingleTickerProviderStateM
8787
}
8888

8989
Widget _showChangeThemeDialog() {
90+
ThemeData theme = Theme.of(context);
9091
return Dialog(
9192
shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(15)),
93+
backgroundColor: theme.colorScheme.surface,
9294
child: Padding(
9395
padding: const EdgeInsets.symmetric(vertical: 16),
9496
child: Column(

lib/features/on_going/view/on_going_page.dart

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ class _FloatingActionButton extends StatelessWidget {
3333
foregroundColor: theme.colorScheme.onPrimary,
3434
shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(15)),
3535
padding: const EdgeInsets.all(16),
36+
backgroundColor: theme.colorScheme.surface,
3637
),
3738
icon: const Icon(Icons.add),
3839
label: const Text("Tambah Celengan", style: TextStyle(fontWeight: FontWeight.bold)),

lib/features/wish_detail/view/wish_detail_screen.dart

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ class WishDetailScreen extends StatelessWidget {
1010
Widget build(BuildContext context) {
1111
ThemeData theme = Theme.of(context);
1212
return Scaffold(
13+
backgroundColor: theme.colorScheme.surface,
1314
appBar: AppBar(
1415
title: BlocBuilder<WishBloc, WishState>(
1516
builder: (context, state) {

lib/features/wish_detail/widget/my_expandable_fab.dart

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,9 @@ class MyExpandableFab extends StatelessWidget {
103103
}
104104

105105
Widget _showDeleteWishDialog(BuildContext context) {
106+
ThemeData theme = Theme.of(context);
106107
return AlertDialog(
108+
backgroundColor: theme.colorScheme.surface,
107109
shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(20)),
108110
title: const Text('Hapus tabungan?', style: TextStyle(fontSize: 24, fontWeight: FontWeight.normal)),
109111
actions: [

lib/features/wish_detail/widget/saving_form_dialog.dart

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,11 +20,14 @@ class SavingFormDialog extends StatelessWidget {
2020

2121
@override
2222
Widget build(BuildContext context) {
23+
ThemeData theme = Theme.of(context);
24+
2325
context.read<WishBloc>().add(SavingNominalChanged(value: '0'));
2426
context.read<WishBloc>().add(const SavingMessageChanged(message: ''));
2527
context.read<WishBloc>().add(const SavingNominalValidation(isSavingNominalValid: true));
2628

2729
return AlertDialog(
30+
backgroundColor: theme.colorScheme.surface,
2831
contentPadding: const EdgeInsets.only(top: 20, left: 24, right: 24, bottom: 0),
2932
shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(20)),
3033
title: Text(title, style: const TextStyle(fontSize: 24, fontWeight: FontWeight.normal)),

0 commit comments

Comments
 (0)