match static method

RegExpMatch? match(
  1. String raw,
  2. ColorFormat format
)

Matches raw (leading/trailing whitespace ignored) against the pattern for format. Null means malformed — the single answer both a widget and a headless validator read.

Implementation

static RegExpMatch? match(String raw, ColorFormat format) =>
    _patterns[format]!.firstMatch(raw.trim());