search_then_select_field 0.0.1 copy "search_then_select_field: ^0.0.1" to clipboard
search_then_select_field: ^0.0.1 copied to clipboard

A widget to search for items and then select one of them

A field to search for items and select one of them

Inspired by Autocomplete and Typeahead.

Features #

  • Keyboard support
  • Loading builder, when search process is running
  • Error builder, when search process failed
  • Empty builder, when search result is empty

Getting started #

add package to your pubspec.yml:

search_then_select_field: <latest>

Usage #

SearchThenSelectField<Item>(
  search: (query) async {
    final result = await searchItems(query);
    return [
      for (final item in result)
        Item.fromJson(item),
    ];
  },
  itemBuilder: (context, item) => ListTile(
    title: Text(item.name),
    subtitle: Text(item.code),
  ),
)
0
likes
90
pub points
0%
popularity

Publisher

unverified uploader

A widget to search for items and then select one of them

Repository (GitHub)
View/report issues

Documentation

API reference

License

MIT (LICENSE)

Dependencies

flutter, intl

More

Packages that depend on search_then_select_field