button color background

This commit is contained in:
ryleedavis 2022-10-06 18:24:57 -06:00
parent ebc9c15c3d
commit fac914e4ee
2 changed files with 9 additions and 2 deletions

View file

@ -25,10 +25,10 @@ class SettingsMenuItem<T> extends StatelessWidget {
style: value == group style: value == group
? Theme.of(context) ? Theme.of(context)
.extension<StackColors>()! .extension<StackColors>()!
.getDesktopMenuButtonColorSelected(context) .getDesktopSettingsButtonColor(context)
: Theme.of(context) : Theme.of(context)
.extension<StackColors>()! .extension<StackColors>()!
.getDesktopMenuButtonColor(context), .getDesktopSettingsButtonColor(context),
onPressed: () { onPressed: () {
onChanged(value); onChanged(value);
}, },

View file

@ -1501,4 +1501,11 @@ class StackColors extends ThemeExtension<StackColors> {
textFieldDefaultBG, textFieldDefaultBG,
), ),
); );
ButtonStyle? getDesktopSettingsButtonColor(BuildContext context) =>
Theme.of(context).textButtonTheme.style?.copyWith(
backgroundColor: MaterialStateProperty.all<Color>(
background,
),
);
} }