chipThemeData static method
ChipThemeData
chipThemeData(
- Brightness brightness,
- Palette colors,
- TextTheme textTheme
)
Implementation
static ChipThemeData chipThemeData(
Brightness brightness,
Palette colors,
TextTheme textTheme,
) {
return ChipThemeData.fromDefaults(
brightness: brightness,
secondaryColor: colors.color,
labelStyle: textTheme.bodyMedium!.copyWith(color: colors.colorText),
).copyWith(
checkmarkColor: WidgetStateColor.resolveWith((states) {
return colors.fill;
}),
surfaceTintColor: WidgetStateColor.resolveWith((states) {
return colors.background;
}),
selectedColor: Colors.transparent, // messes everything up because FG can't be set based on state
secondarySelectedColor: colors.textHovered,
secondaryLabelStyle: textTheme.labelLarge!.copyWith(
color: colors.textHoveredText,
),
side: BorderSide(width: 2, color: colors.fill),
backgroundColor: colors.background,
labelStyle: textTheme.labelLarge!.copyWith(color: colors.text),
);
}