hexColor function

LivrRule hexColor(
  1. List<Object?> args,
  2. RuleContext context
)

hex_color: the value must be # and 3, 4, 6 or 8 hexadecimal digits: #RGB, #RGBA, #RRGGBB or #RRGGBBAA. The output is the value as a string.

Implementation

LivrRule hexColor(List<Object?> args, RuleContext context) {
  if (args.isNotEmpty) {
    throw const LivrSchemaException('Rule [hex_color] takes no arguments');
  }
  return _hexColor;
}