autocomplete_textfield 1.7.3

  • Readme
  • Changelog
  • Example
  • Installing
  • 98

autocomplete_textfield #

An autocomplete textfield for flutter

pull requests #

Feel free to submit pull requests for desired changes / features / bug fixes... It makes the maintenance of this code much easier as I no longer use Flutter frequently.

Pub Package Can Be Found At #

Pub Package

Breaking Changes #

TextField is set by default to call onSubmitted on a suggestion tap and also to clear the TextField on submit.

These can both be disabled with submitOnSuggestionTap and clearOnSubmit respectively.

Usage #

AutoCompleteTextField supports any data type suggestions

new AutoCompleteTextField<YOURDATATYPE>()

The suggestions parameter must have data that matches <YOURDATATYPE>

A global key of type GlobalKey<AutoCompleteTextFieldState<T>> is required so that the clear() method can be called to clear AutoCompleteTextField.

Strings and itemFilter #

Filtering is case sensitive so when using strings a common implementation of itemFilter is .
itemFilter: (item, query) { return item.toLowerCase().startsWith(query.toLowerCase()); }

Changelog #

[1.0.0]

Works great published version 1

[1.4.0]

A few bug fixes and more functionality added.

Added textInputAction.

Breaking Changes [1.4.0]

TextField is set by default to call onSubmitted on a suggestion tap and also to clear the TextField on submit.

These can both be disabled with submitOnSuggestionTap and clearOnSubmit respectively.

[1.4.1] Added textCapitalization option

[1.5.0]

Added the ability to update suggestions dynamically!

Use updateSuggestions, addSuggestion and removeSuggestion.

[1.5.1]

Oops, spelling error.

[1.6.0]

Fixed the non-string datatype issue.

[1.6.1]

Exposed textField

[1.6.2]

Fixed example and new vid thing

[1.6.4] Added input formatters.

[1.6.7] Added TextEditingController to SimpleAutoCompleteTextfield. Added null check to focus node listener.

[1.6.8] Implemented dispose for autocomplete_textfield, cleans up resources after using. Also added focusNode which can be passed in by user.

[1.7.0] Added the ability to specify starting text through TextEditingController, and the new method triggerSubmit was added.

Breaking Changes #

Now submitting text calls triggerSubmit and clearText clears internal current text.

[1.7.1] All fields are final now in AutoCompleteTextField.

[1.7.3] InputDecoration and styles etc can now be changed dynamically with the updateDecoration() method.

example/README.md

example #

Example project for autocomplete textfield

Getting Started #

For help getting started with Flutter, view our online documentation.

Use this package as a library

1. Depend on it

Add this to your package's pubspec.yaml file:


dependencies:
  autocomplete_textfield: ^1.7.3

2. Install it

You can install packages from the command line:

with Flutter:


$ flutter pub get

Alternatively, your editor might support flutter pub get. Check the docs for your editor to learn more.

3. Import it

Now in your Dart code, you can use:


import 'package:autocomplete_textfield/autocomplete_textfield.dart';
  
Popularity:
Describes how popular the package is relative to other packages. [more]
96
Health:
Code health derived from static analysis. [more]
100
Maintenance:
Reflects how tidy and up-to-date the package is. [more]
100
Overall:
Weighted score of the above. [more]
98
Learn more about scoring.

We analyzed this package on Oct 18, 2019, and provided a score, details, and suggestions below. Analysis was completed with status completed using:

  • Dart: 2.5.1
  • pana: 0.12.21
  • Flutter: 1.9.1+hotfix.4

Platforms

Detected platforms: Flutter

References Flutter, and has no conflicting libraries.

Dependencies

Package Constraint Resolved Available
Direct dependencies
Dart SDK >=1.19.0 <3.0.0
flutter 0.0.0
Transitive dependencies
collection 1.14.11 1.14.12
meta 1.1.7
sky_engine 0.0.99
typed_data 1.1.6
vector_math 2.0.8
Dev dependencies
flutter_test