extractSorted<T> method
List<ExtractedResult<T> >
extractSorted<T>(
- String query,
- List<
T> choices, - Applicable func, [
- String getter(
- T obj
Creates a sorted list of ExtractedResult from the most similar choices to the least.
Implementation
List<ExtractedResult<T>> extractSorted<T>(
String query, List<T> choices, Applicable func,
[String Function(T obj)? getter]) {
var best = extractWithoutOrder(query, choices, func, getter)..sort();
return best.reversed.toList();
}