FlutterFlow Docs
Search…
⌃K

Backend Query

Backend Query helps you to trigger a query automatically whenever a user navigates to the page containing the query. You can set a Backend Query on a particular widget or an entire page. The information retrieved using the Backend Query can be used in any widget present inside.

Types of Query

FlutterFlow provides the following types of Backend Queries that you can specify on any widget or page of your app (you can navigate to the specific Backend Query page to learn how to use it):
The difference between an Action and a Backend Query:
Action requires the user to perform a gesture like a tap or a double-tap on the widget containing the Action. You can specify more than one Action on the same widget.
Backend Query gets triggered automatically as soon as the user navigates to the page containing the query. You can specify only one Backend Query on a particular widget or page.

Change loading indicator

While the backend query is busy retrieving results, it shows the default Project Theme Loading Indicator (which you can change from Settings and Integrations > General > Theme > Loading Indicator). However, if you want to replace this with a custom loading indicator, such as a GIF image, follow the instructions below:
Custom loading indicator
To change the loading indicator:
  • Ensure you have added a backend query.
  • Open the Backend Query section (on the right side) and scroll down to the Backend Query Loading Widget. Open it by clicking on the arrow icon.
  • Set the Loading Widget Type to Image. You can also choose a Component if you have already designed a loading component.
  • Enable the View in UI Builder. This allows you to see your custom loading indicator on canvas.
  • Choose the Image Type, add the image, and adjust its Padding and Width.
  • To show the indicator in the center, turn on the Center Image toggle.
  • Run the app, and your custom loading indicator will appear while the data is being loaded.
Changing loading indicator

Copy Query

Sometimes you might want to display the same list of items with a little modification. For example, showing all Todo items and completed Todo items. In such a case, you can copy-paste the entire backend query to speed up the building process. This is helpful, especially when you have a complex backend query.
To copy-paste the query:
  • Select the widget (e.g., ListView, GridView, etc.) where you have already added the backend query.
  • Select the Backend Query tab, scroll down and click the Copy button.
  • Now, select the widget (where you want to add the query), move to the Backend Query tab click the Paste Backend Query button.
  • Click Confirm.
Copy-paste backend query