matchesWildcard static method
* → any chars; case-insensitive. Exposed for tests.
Implementation
static bool matchesWildcard(String value, String pattern) {
final escaped = RegExp.escape(pattern).replaceAll(r'\*', '.*');
return RegExp('^$escaped\$', caseSensitive: false).hasMatch(value);
}