HexColorValidationController constructor

HexColorValidationController({
  1. String message = 'Invalid Hexcolor',
  2. bool required = false,
})

Implementation

HexColorValidationController(
    {String message = 'Invalid Hexcolor', bool required = false})
    : super(
          message: message,
          isValid: ({controller}) {
            String? textValue = controller?.rawValue?.toString();
            if (!required && TextUtils.isEmpty(textValue)) return true;
            return Validators.isHexColor(textValue!);
          });