color method

Text color(
  1. Color? color
)

Applies the specified color to the text, same as Text("data", style: TextStyle(color: color)

Implementation

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