How to set up a loop to call an API every second in FlutterFlow?

Actions & Logic
Resolved

Hello FlutterFlow community!

I’m trying to set up a loop in FlutterFlow that calls an API every second, but I’m not entirely sure how to configure the Loop Action and set the correct interval for it. I’ve already created an API in FlutterFlow, and I want to repeat the API call at a specific interval (every second).

Here’s what I want to achieve:

  1. The API should be triggered every second.

  2. I want to use the built-in Loop Action available in the FlutterFlow Action window.

  3. I’m unsure how to set the Repeat Frequency for 1 second (or any interval).

  4. Optionally, if there is a way to stop the loop after a certain condition, I’d like to know how to do that as well.

Can someone guide me on how to set this up correctly?

What have you tried so far?
  • Using the Loop Action:

    • I’ve tried using the Loop action from the Actions menu in FlutterFlow.

    • I’ve set the Loop Type to "Repeat," but I'm not sure how to set the Repeat Frequency for 1 second.

    • I’ve added an API Call inside the loop, but I'm unsure if the loop will execute every second as intended.

  • Testing Without Custom Code:

    • I am specifically looking to use the FlutterFlow built-in actions and do not want to use any custom code. My goal is to set this up purely with the tools provided by FlutterFlow.

Did you check FlutterFlow's Documentation for this topic?
Yes
4
5 replies