kValidHexPattern top-level constant
String
const kValidHexPattern
Matches the start of a hex colour while it's being typed: an optional
# followed by one to eight hex digits.
Use it to filter text field input. Use kCompleteValidHexPattern to check a finished value.
Implementation
const String kValidHexPattern = r'^#?[0-9a-fA-F]{1,8}';