@@ -99,7 +99,10 @@ const _tooltipThemeData = TooltipThemeData(
9999
100100// Buttons
101101
102- const _commonButtonStyle = ButtonStyle (visualDensity: VisualDensity .standard);
102+ const _commonButtonStyle = ButtonStyle (
103+ visualDensity: VisualDensity .standard,
104+ padding: MaterialStatePropertyAll (EdgeInsets .symmetric (horizontal: 16 )),
105+ );
103106
104107final _buttonThemeData = ButtonThemeData (
105108 shape: RoundedRectangleBorder (
@@ -117,13 +120,12 @@ OutlinedButtonThemeData _createOutlinedButtonTheme(
117120 ? colorScheme.outlineVariant
118121 : colorScheme.outline,
119122 ),
120- visualDensity: _commonButtonStyle.visualDensity,
121123 // backgroundColor: colorScheme.surface, // defaults to transparent
122124 foregroundColor: colorScheme.onSurface,
123125 shape: RoundedRectangleBorder (
124126 borderRadius: BorderRadius .circular (kButtonRadius),
125127 ),
126- ),
128+ ). merge (_commonButtonStyle) ,
127129 );
128130}
129131
@@ -134,11 +136,10 @@ TextButtonThemeData _createTextButtonTheme(
134136 style: TextButton .styleFrom (
135137 iconColor: colorScheme.primary,
136138 foregroundColor: colorScheme.primary,
137- visualDensity: _commonButtonStyle.visualDensity,
138139 shape: RoundedRectangleBorder (
139140 borderRadius: BorderRadius .circular (kButtonRadius),
140141 ),
141- ),
142+ ). merge (_commonButtonStyle) ,
142143 );
143144}
144145
@@ -151,7 +152,6 @@ ElevatedButtonThemeData _createElevatedButtonTheme({
151152 style: ElevatedButton .styleFrom (
152153 backgroundColor: color,
153154 foregroundColor: textColor ?? contrastColor (color),
154- visualDensity: _commonButtonStyle.visualDensity,
155155 elevation: 0 ,
156156 shadowColor: Colors .transparent,
157157 shape: RoundedRectangleBorder (
@@ -160,7 +160,7 @@ ElevatedButtonThemeData _createElevatedButtonTheme({
160160 : BorderSide .none,
161161 borderRadius: BorderRadius .circular (kButtonRadius),
162162 ),
163- ),
163+ ). merge (_commonButtonStyle) ,
164164 );
165165}
166166
@@ -173,7 +173,6 @@ FilledButtonThemeData _createFilledButtonTheme(
173173 backgroundColor: colorScheme.onSurface.withOpacity (0.1 ),
174174 surfaceTintColor: colorScheme.onSurface.withOpacity (0.1 ),
175175 foregroundColor: colorScheme.onSurface,
176- visualDensity: _commonButtonStyle.visualDensity,
177176 elevation: 0 ,
178177 shadowColor: Colors .transparent,
179178 shape: RoundedRectangleBorder (
@@ -182,7 +181,7 @@ FilledButtonThemeData _createFilledButtonTheme(
182181 : BorderSide .none,
183182 borderRadius: BorderRadius .circular (kButtonRadius),
184183 ),
185- ),
184+ ). merge (_commonButtonStyle) ,
186185 );
187186}
188187
0 commit comments