check method

bool check (
  1. String text,
  2. Pattern pattern
)

Implementation

static bool check(String text, Pattern pattern) {
  return RegExp(pattern).hasMatch(text);
}