withColor method

Text withColor(
  1. Color color
)

Applies a single color to the text.

Implementation

Text withColor(Color color) {
  return Text(
    data ?? '',
    style: (style ?? const TextStyle()).copyWith(color: color),
  );
}