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):
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
- widget/platform/_cupertino_query_field_data
- utils/_func_types
- widget/platform/_material_query_field_data
- theme/_theme
- theme/_theme_defaults
- widget/cupertino_query_field
- widget/eared
- widget/material_query_field
- localization/l10n/strings/default/results/messages_all
- localization/l10n/semantics/results/messages_all
- localization/l10n/semantics/results/messages_en
- localization/l10n/strings/default/results/messages_en
- localization/l10n/strings/default/results/messages_ru
- localization/l10n/semantics/results/messages_ru
- query_field
- localization/semantics
- localization/strings