Filter.matches constructor Null safety

Filter.matches(
  1. String field,
  2. String pattern,
  3. {bool? anyInList}
)

Use RegExp pattern matching for the given field which has to be a string.

If anyInList is true, it means that if field is a list, a record matches if any of the list item matches the pattern.

Implementation

factory Filter.matches(String field, String pattern, {bool? anyInList}) =>
    Filter.matchesRegExp(field, RegExp(pattern), anyInList: anyInList);