parseColor function

Color? parseColor(
  1. String? string
)

Implementation

Color? parseColor(String? string) {
  if (string == null) return null;
  int colorInt = int.tryParse(string, radix: 16) ?? 0xFFFFFFFF;
  return Color(colorInt);
}