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