getTextColor function

Color getTextColor(
  1. AntdTypofraphyType? type,
  2. bool? disabled,
  3. bool? mark
)

获取字体颜色

Implementation

Color getTextColor(AntdTypofraphyType? type, bool? disabled, bool? mark) {
  Color color = iTextBaseColor;
  if (disabled != null && disabled) return iTextDisabledColor;
  if (mark != null && mark) return iTextSecondaryColor;
  if (type == null) return color;
  switch (type) {
    case AntdTypofraphyType.secondary:
      color = iTextSecondaryColor;
      break;
    case AntdTypofraphyType.success:
      color = iSuccessText;
      break;
    case AntdTypofraphyType.warning:
      color = iWarnText;
      break;
    case AntdTypofraphyType.danger:
      color = iErrorText;
      break;
  }
  return color;
}