diff --git a/example/lib/pages/components/button_example.dart b/example/lib/pages/components/button_example.dart index 10b1bf46..d44b656c 100644 --- a/example/lib/pages/components/button_example.dart +++ b/example/lib/pages/components/button_example.dart @@ -107,7 +107,7 @@ class _ButtonExampleState extends State { Column(children: inputButtons(ZetaWidgetBorder.rounded)), Text('Sharp Buttons', style: ZetaTextStyles.displayMedium), Column(children: inputButtons(ZetaWidgetBorder.sharp)), - Text('Icon Buttons', style: ZetaTextStyles.displayLarge), + Text('Group Buttons', style: ZetaTextStyles.displayLarge), Column( children: groupButtons(ZetaWidgetBorder.rounded), ), diff --git a/lib/src/components/buttons/button_group.dart b/lib/src/components/buttons/button_group.dart index 6fef2c07..2b73f194 100644 --- a/lib/src/components/buttons/button_group.dart +++ b/lib/src/components/buttons/button_group.dart @@ -10,7 +10,7 @@ class ZetaButtonGroup extends StatelessWidget { {super.key, required this.buttons, required this.rounded, - required this.isLarge}); + required this.isLarge,}); /// Determines size of [GroupButton] final bool isLarge; @@ -219,8 +219,7 @@ class _GroupButtonState extends State { } ButtonStyle getStyle(ZetaWidgetBorder borderType, ZetaColors colors) { - final ZetaColorSwatch color = - selected ? colors.cool : ZetaColorSwatch.fromColor(colors.black); + return ButtonStyle( shape: MaterialStateProperty.all( @@ -247,7 +246,7 @@ class _GroupButtonState extends State { if (states.contains(MaterialState.disabled)) { return colors.textDisabled; } - if (selected) return color.onColor; + if (selected) return colors.black.onColor; return colors.textDefault; }), elevation: const MaterialStatePropertyAll(0),