getSuggestions method

List<String> getSuggestions(
  1. String query
)

Implementation

List<String> getSuggestions(String query) {
  List<String> matches = [];
  matches.addAll(suggestions);

  matches.retainWhere((s) => s.toLowerCase().contains(query.toLowerCase()));
  return matches;
}