titleTextColor method

Color titleTextColor(
  1. BuildContext context, {
  2. Set<MaterialState>? materialStates,
  3. Map<String, dynamic>? extraInfo,
})

Implementation

Color titleTextColor(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('#2d2d2d');
  }
}