text_search 1.0.1
text_search: ^1.0.1 copied to clipboard
Simple in-memory fuzzy text searching library.
example/text_search_example.dart
import 'package:text_search/text_search.dart';
final searchableItems = [
TextSearchItem.fromTerms(
'Coffee Shop', ['coffee', 'latte', 'macchiato', 'tea']),
TextSearchItem.fromTerms('Dessert', ['ice cream', 'cake', 'pastry']),
TextSearchItem.fromTerms('Milk Tea Shop', ['boba', 'milk tea', 'bubble tea']),
];
final placeTypeSearch = TextSearch(searchableItems);
void main() {
print(placeTypeSearch.search('icecream'));
}