File tree 1 file changed +22
-3
lines changed
1 file changed +22
-3
lines changed Original file line number Diff line number Diff line change 1
1
# autocomplete_textfield
2
2
3
3
An autocomplete textfield for flutter
4
+
5
+ ## Pub Package Can Be Found At
6
+
7
+ [ Pub Package] ( https://pub.dartlang.org/packages/autocomplete_textfield#-example-tab- )
8
+
9
+ ## Usage
10
+
11
+ AutoCompleteTextField supports any data type suggestions
12
+
13
+ ` new AutoCompleteTextField<YOURDATATYPE>() `
14
+
15
+ The suggestions parameter must have data that matches ` <YOURDATATYPE> `
16
+
17
+ A global key of type ` GlobalKey<AutoCompleteTextFieldState<T>> ` is required so that the ` clear() ` method can be called to clear AutoCompleteTextField.
4
18
5
- ## Getting Started
19
+ # Strings and itemFilter
6
20
7
- For help getting started with Flutter, view our online [ documentation] ( https://flutter.io/ ) .
21
+ Filtering is case sensitive so when using strings a common implementation of itemFilter is .
22
+ `
23
+ itemFilter: (item, query) {
24
+ return item.toLowerCase().startsWith(query.toLowerCase());
25
+ }
26
+ `
8
27
9
- For help on editing package code, view the [ documentation ] ( https://flutter.io/developing-packages/ ) .
28
+ ![ ] ( textfield-demo.gif )
You can’t perform that action at this time.
0 commit comments