extractOne<T> function
ExtractedResult<T>
extractOne<T>({
- required String query,
- required List<
T> choices, - int cutoff = 0,
- Applicable ratio = const WeightedRatio(),
- String getter(
- T obj
Find the single best match above the cutoff
in a list of choices.
getter
is optional for String types, but MUST NOT be null for any other
types
Implementation
ExtractedResult<T> extractOne<T>({
required String query,
required List<T> choices,
int cutoff = 0,
Applicable ratio = const WeightedRatio(),
String Function(T obj)? getter,
}) {
var extractor = Extractor(cutoff);
return extractor.extractOne(query, choices, ratio, getter);
}