hexColor static method

String? Function(String?) hexColor({
  1. String errorMessage = 'Please enter a valid hex color (e.g. #ff0000)',
})

Ensures the string is a valid hex color.

Implementation

static String? Function(String?) hexColor({
  String errorMessage = 'Please enter a valid hex color (e.g. #ff0000)',
}) {
  return _build(errorMessage, (v) => v.isHexColor);
}