autocomplete_textfield 1.6.4

  • README.md
  • CHANGELOG.md
  • Example
  • Installing
  • Versions
  • 96

autocomplete_textfield #

An autocomplete textfield for flutter

pull requests #

Feel free to submit pull requests!

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()); }

[1.0.0]

Works great published version 1

[1.4.0]

A few bug fixes and more functionality added.

Added textInputAction.

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.

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

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

2. Install it

You can install packages from the command line:

with Flutter:


$ flutter packages get

Alternatively, your editor might support flutter packages 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';
  
Version Uploaded Documentation Archive
1.6.4 Dec 5, 2018 Go to the documentation of autocomplete_textfield 1.6.4 Download autocomplete_textfield 1.6.4 archive
1.6.3 Nov 29, 2018 Go to the documentation of autocomplete_textfield 1.6.3 Download autocomplete_textfield 1.6.3 archive
1.6.2 Nov 29, 2018 Go to the documentation of autocomplete_textfield 1.6.2 Download autocomplete_textfield 1.6.2 archive
1.6.1 Nov 27, 2018 Go to the documentation of autocomplete_textfield 1.6.1 Download autocomplete_textfield 1.6.1 archive
1.6.0 Nov 27, 2018 Go to the documentation of autocomplete_textfield 1.6.0 Download autocomplete_textfield 1.6.0 archive
1.5.1 Oct 20, 2018 Go to the documentation of autocomplete_textfield 1.5.1 Download autocomplete_textfield 1.5.1 archive
1.5.0 Oct 20, 2018 Go to the documentation of autocomplete_textfield 1.5.0 Download autocomplete_textfield 1.5.0 archive
1.4.1 Sep 30, 2018 Go to the documentation of autocomplete_textfield 1.4.1 Download autocomplete_textfield 1.4.1 archive
1.4.0 Sep 29, 2018 Go to the documentation of autocomplete_textfield 1.4.0 Download autocomplete_textfield 1.4.0 archive
1.3.0 Sep 2, 2018 Go to the documentation of autocomplete_textfield 1.3.0 Download autocomplete_textfield 1.3.0 archive

All 16 versions...

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

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

  • Dart: 2.2.0
  • pana: 0.12.14
  • Flutter: 1.3.3

Platforms

Detected platforms: Flutter

References Flutter, and has no conflicting libraries.

Health suggestions

Fix lib/autocomplete_textfield.dart. (-1 points)

Analysis of lib/autocomplete_textfield.dart reported 2 hints:

line 15 col 7: This class (or a class which this class inherits from) is marked as '@immutable', but one or more of its instance fields are not final: AutoCompleteTextField.suggestions, AutoCompleteTextField.itemFilter, AutoCompleteTextField.itemSorter, AutoCompleteTextField.textChanged, AutoCompleteTextField.textSubmitted, AutoCompleteTextField.itemSubmitted, AutoCompleteTextField.itemBuilder, AutoCompleteTextField.suggestionsAmount, AutoCompleteTextField.key, AutoCompleteTextField.submitOnSuggestionTap, AutoCompleteTextField.clearOnSubmit, AutoCompleteTextField.inputFormatters, AutoCompleteTextField.decoration, AutoCompleteTextField.style, AutoCompleteTextField.keyboardType, AutoCompleteTextField.textInputAction, AutoCompleteTextField.textCapitalization

line 267 col 7: This class (or a class which this class inherits from) is marked as '@immutable', but one or more of its instance fields are not final: AutoCompleteTextField.suggestions, AutoCompleteTextField.itemFilter, AutoCompleteTextField.itemSorter, AutoCompleteTextField.textChanged, AutoCompleteTextField.textSubmitted, AutoCompleteTextField.itemSubmitted, AutoCompleteTextField.itemBuilder, AutoCompleteTextField.suggestionsAmount, AutoCompleteTextField.key, AutoCompleteTextField.submitOnSuggestionTap, AutoCompleteTextField.clearOnSubmit, AutoCompleteTextField.inputFormatters, AutoCompleteTextField.decoration, AutoCompleteTextField.style, AutoCompleteTextField.keyboardType, AutoCompleteTextField.textInputAction, AutoCompleteTextField.textCapitalization

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
meta 1.1.6 1.1.7
sky_engine 0.0.99
typed_data 1.1.6
vector_math 2.0.8
Dev dependencies
flutter_test