a flutter package that provides a customizable search field with autocomplete suggestions. It is designed to make it easy to implement autocomplete functionality in your Flutter applications.
- Display autocomplete suggestions as the user types.
- Support for iOS-style search fields (Cupertino) and Material Design search fields.
- Customize sorting and filtering of suggestions.
- Highly customizable with various styling options.
import the package in your Dart code:
import 'package:search_field_autocomplete/search_field_autocomplete.dart';
SearchFieldAutoComplete<String>(
suggestions: [
SearchFieldAutoCompleteItem<String>(searchKey: 'Apple', value: 'apple'),
SearchFieldAutoCompleteItem<String>(searchKey: 'Banana', value: 'banana'),
SearchFieldAutoCompleteItem<String>(searchKey: 'Cherry', value: 'cherry'),
SearchFieldAutoCompleteItem<String>(searchKey: 'Date', value: 'date'),
SearchFieldAutoCompleteItem<String>(searchKey: 'Fig', value: 'fig'),
SearchFieldAutoCompleteItem<String>(searchKey: 'Grapes', value: 'grapes'),
SearchFieldAutoCompleteItem<String>(searchKey: 'Kiwi', value: 'kiwi'),
],
onSuggestionSelected: (value) {
// Handle the selected suggestion
print('Selected: $value');
},
);
Contributions are welcome! If you encounter any issues or have suggestions for improvements, please open an issue or create a pull request on GitHub.
This package is licensed under the MIT License - see the LICENSE file for details.