getFilledButtonFonts function
TextStyle?
getFilledButtonFonts(
- S360fButtonSize size,
- ThemeData theme, {
- bool isDisable = false,
- S360fWidgetColorVariant color = S360fWidgetColorVariant.primary,
Implementation
TextStyle? getFilledButtonFonts(
S360fButtonSize size,
ThemeData theme, {
bool isDisable = false,
S360fWidgetColorVariant color = S360fWidgetColorVariant.primary,
}) {
final buttonColors = getButtonColors(theme, color, isDisable: isDisable);
switch (size) {
case S360fButtonSize.small:
return theme.textTheme.labelLarge?.copyWith(
color: isDisable ? theme.disabledColor : buttonColors.foreground,
);
case S360fButtonSize.medium:
return theme.textTheme.labelLarge?.copyWith(
color: isDisable ? theme.disabledColor : buttonColors.foreground,
);
case S360fButtonSize.large:
return theme.textTheme.bodyMedium?.copyWith(
fontWeight: FontWeight.w600,
color: isDisable ? theme.disabledColor : buttonColors.foreground,
);
}
}