subtitleTextColor method
Color
subtitleTextColor(
- BuildContext context, {
- Set<
MaterialState> ? materialStates, - Map<
String, dynamic> ? extraInfo,
override
Implementation
@override
Color subtitleTextColor(BuildContext context, {Set<MaterialState>? materialStates, Map<String, dynamic>? extraInfo}) {
materialStates ??= <MaterialState>{};
if (materialStates.isPressed) {
return Colors.white;
} else if (materialStates.isHovering || materialStates.isFocused) {
return Colors.white.withAlpha(100);
} else if (materialStates.isSelected) {
return (Colors.grey[900] ?? Colors.grey).withAlpha(200);
} else if (materialStates.isDisabled) {
return Colors.grey;
} else {
// isNormal
return HexColor.fromHex('#7a7a7a');
}
}