describeMatch abstract method

String describeMatch(
  1. Plurality plurality
)

Describes zero, one, or more candidates that match the requirements of a finder.

The description returned should be a brief English phrase describing a matching candidate with the proper plural form. As an example for a string finder that is looking for strings starting with "hello":

String describeMatch(Plurality plurality) {
  return switch (plurality) {
    Plurality.zero || Plurality.many => 'strings starting with "hello"',
    Plurality.one => 'string starting with "hello"',
  };
}

This will be used both to describe a finder and the results of searching with that finder.

See also:

Implementation

String describeMatch(Plurality plurality);