query_field

A Flutter's widget that represent search fields for different platforms.

Currently there are two designs supported:

  • Material MaterialSearchField

    Inspired by search field from Google's material apps

  • Cupertion CupertinoSearchField

    Inspired by search field from Apple's apps

Preview (You can find source code for the preview under example directory):

Preview

Getting Started

Usage of the field quite similart to usage of TextField. The widget has leading and trailing widgets which will dissapear when user start typing and text control buttons (dissmiss and clear) will appear.

Material search field minimal example:

MaterialSearchField(
    onChanged: (text) {},
    onDismissed: () {},
)

Cupertino search field minimal example:

CupertinoSearchField(
    onChanged: (text) {},
    onDismissed: () {},
)

Use as Platform Widget:

The library supports Flutter Platform Widgets

PlatformSearchField(
    onChanged: (text) {},
    onDismissed: () {},
)

Internationalization

You can provide your own strings for: hintText and dismissText directly by:

  • Widget constructor
  • Providing SearchFieldStringsLocalizations as localisation delegate
  • Contributing to the repository (The package support flutter_intl, or try to do that)

Libraries

_cupertino_query_field_data
_func_types
_material_query_field_data
_theme
_theme_defaults
cupertino_query_field
eared
material_query_field
messages_all
messages_all
messages_en
messages_en
messages_ru
messages_ru
platform_query_field
query_field
semantics
strings