Skip to content

Commit 8baa979

Browse files
author
Lukas Gundermann
committed
refactor: Nest SecondaryButtonTheme within OutlineButtonTheme
This commit refactors the widget structure in `ButtonThemesOverride`. The `SecondaryButtonTheme` is now wrapped within a new `ComponentTheme` that provides an `OutlineButtonTheme`. This change improves the thematic structure by nesting related button themes.
1 parent 41c3ede commit 8baa979

1 file changed

Lines changed: 13 additions & 2 deletions

File tree

lib/screens/widgets/overrides/button_themes.dart

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ class ButtonThemes extends StatelessWidget {
88
@override
99
Widget build(BuildContext context) {
1010
return ComponentTheme(
11-
data: SecondaryButtonTheme(
11+
data: OutlineButtonTheme(
1212
decoration: (context, states, defaultDecoration) {
1313
return defaultDecoration;
1414
// return defaultDecoration.copyWithIfBoxDecoration(
@@ -17,7 +17,18 @@ class ButtonThemes extends StatelessWidget {
1717
// );
1818
},
1919
),
20-
child: child,
20+
child: ComponentTheme(
21+
data: SecondaryButtonTheme(
22+
decoration: (context, states, defaultDecoration) {
23+
return defaultDecoration;
24+
// return defaultDecoration.copyWithIfBoxDecoration(
25+
// color: Colors.red,
26+
// border: Border.all(color: Colors.green, width: 10),
27+
// );
28+
},
29+
),
30+
child: child,
31+
),
2132
);
2233
}
2334
}

0 commit comments

Comments
 (0)