toggleButtonsThemeData static method
ToggleButtonsThemeData
toggleButtonsThemeData(
- Palette colors,
- TextTheme textTheme
)
Implementation
static ToggleButtonsThemeData toggleButtonsThemeData(
Palette colors,
TextTheme textTheme,
) {
return ToggleButtonsThemeData(
textStyle: textTheme.labelLarge,
constraints: const BoxConstraints(
minWidth: touchSize,
minHeight: touchSize - 8,
),
color: WidgetStateColor.resolveWith((states) {
// States are always empty.
return colors.text;
}),
selectedColor: WidgetStateColor.resolveWith((states) {
return colors.colorText;
}),
disabledColor: colors.text,
fillColor: colors.color,
focusColor: colors.colorHovered,
highlightColor: Colors.transparent,
hoverColor: WidgetStateColor.resolveWith((states) {
return colors.textHovered;
}),
splashColor: colors.fillSplashed,
borderColor: colors.colorBorder,
selectedBorderColor: colors.colorBorder,
disabledBorderColor: colors.colorBorder,
borderRadius: BorderRadius.circular(8),
borderWidth: 2,
);
}