Skip to content

Abbas1Hussein/search_field_autocomplete

Repository files navigation

pub package GitHub GitHub stars GitHub forks

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.

Features

  • 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.

Usage

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');
  },
);

Contributing

Contributions are welcome! If you encounter any issues or have suggestions for improvements, please open an issue or create a pull request on GitHub.

License

This package is licensed under the MIT License - see the LICENSE file for details.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published