option text color changes on selection

This commit is contained in:
ryleedavis 2022-10-06 18:23:49 -06:00
parent 09641167fb
commit ebc9c15c3d
2 changed files with 40 additions and 2 deletions

View file

@ -47,8 +47,8 @@ class SettingsMenuItem<T> extends StatelessWidget {
Text(
label,
style: value == group //checks if option is selected
? STextStyles.desktopMenuItemSelected(context)
: STextStyles.desktopMenuItem(context),
? STextStyles.settingsMenuItemSelected(context)
: STextStyles.settingsMenuItem(context),
),
],
),

View file

@ -793,6 +793,44 @@ class STextStyles {
}
}
static TextStyle settingsMenuItem(BuildContext context) {
switch (_theme(context).themeType) {
case ThemeType.light:
return GoogleFonts.inter(
color: _theme(context).textDark.withOpacity(0.5),
fontWeight: FontWeight.w500,
fontSize: 16,
height: 20.8 / 16,
);
case ThemeType.dark:
return GoogleFonts.inter(
color: _theme(context).textDark.withOpacity(0.5),
fontWeight: FontWeight.w500,
fontSize: 16,
height: 20.8 / 16,
);
}
}
static TextStyle settingsMenuItemSelected(BuildContext context) {
switch (_theme(context).themeType) {
case ThemeType.light:
return GoogleFonts.inter(
color: _theme(context).textDark,
fontWeight: FontWeight.w500,
fontSize: 16,
height: 20.8 / 16,
);
case ThemeType.dark:
return GoogleFonts.inter(
color: _theme(context).textDark,
fontWeight: FontWeight.w500,
fontSize: 16,
height: 20.8 / 16,
);
}
}
static TextStyle stepIndicator(BuildContext context) {
switch (_theme(context).themeType) {
case ThemeType.light: