Simple Search Action
Using this action you can search from the Firestore collection, list of documents, and list of strings.
Simple Search is performed on the user's device after reading the entire collection. This is only suitable for a small collection. Searching a larger collection can be slow and expensive. For larger collections, it's best to use Aloglia or other search service.

Simple search demo
Before you add the simple search action, you'll need to have a list of data displayed on the screen and built a search bar UI. If you haven't already done so you can follow the instructions here.
There are mainly three types of search you can add to the page:
- 1.Firestore collection: Use this to query a collection and filter a list.
- 2.Documents: Use this to search from the list of documents stored in a variable.
- 3.Strings: Use this to search from the list of strings stored in a variable.
Go to your project page on FlutterFlow and follow the steps below to define the Action to any widget.
- Select the Widget (e.g. Button) on which you want to define the action.
- Select Actions from the Properties panel (the right menu), and click Open. This will open an Action flow Editor in a new popup window.
- Click on the + Add Action.
- On the right side, search and select the Simple Search action.
- Select the Search Type among the Firestore Collection, Documents, and Strings.
- If you select the Firestore Collection:
- Set the Collection to the collection_name that you want to search from.
- Select the searchable field to the field that you want to perform the search on. For example, the field that contains the values in Text such as name, address, and email.
- If you select the Documents:
- Set the Source to the variable that holds the list of documents. For example the result of the query at a top-level widget such as Page or Column
- Select the searchable field to the field that you want to perform the search on. For example, the field that contains the values in Text such as name, address, and email.
- If you select the Strings:
- Set the Source to the variable that holds the list of strings. For example, if you store in a local state variable, set the Source the Local State and Available Options to the variable_name.
- Inside the Search Term section, set the Value Source to From Variable.
- Set the Source to Widget State.
- Set the Available Options to the name of the TextField that allows users to enter a search term (e.g. textController).

Defining simple search action
Last modified 1yr ago