subtitleTextColor method

  1. @override
Color subtitleTextColor(
  1. BuildContext context, {
  2. Set<MaterialState>? materialStates,
  3. 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.grey[900] ?? 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 HexColor.fromHex('#7a7a7a');
  }
}