Skip to content

Commit 79b2906

Browse files
author
ctrlVnt
committed
Enhanced : global theme for dialog and buttons style
1 parent 1ab9163 commit 79b2906

1 file changed

Lines changed: 22 additions & 0 deletions

File tree

lib/main.dart

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,28 @@ class MyApp extends StatelessWidget {
7878
theme: ThemeData(
7979
colorSchemeSeed: Colors.white,
8080
useMaterial3: true,
81+
dialogTheme: DialogThemeData(
82+
backgroundColor: Colors.white,
83+
surfaceTintColor: Colors.transparent,
84+
elevation: 0,
85+
shape: RoundedRectangleBorder(
86+
borderRadius: BorderRadius.circular(28.0),
87+
),
88+
actionsPadding:
89+
const EdgeInsets.symmetric(horizontal: 16, vertical: 8),
90+
titleTextStyle: const TextStyle(
91+
fontWeight: FontWeight.bold,
92+
fontSize: 18,
93+
color: Colors.black,
94+
),
95+
),
96+
textButtonTheme: TextButtonThemeData(
97+
style: TextButton.styleFrom(
98+
foregroundColor: Colors.red,
99+
textStyle: const TextStyle(fontWeight: FontWeight.bold),
100+
padding: const EdgeInsets.all(15),
101+
),
102+
),
81103
),
82104
locale: locale ?? const Locale('en', 'US'),
83105
localizationsDelegates: const [

0 commit comments

Comments
 (0)