Flutter - How to show multiple pop up widgets one after another based on a list?

310

Have you tried a for while loop, whilst your pendingOrders list has items that meet the condition isNew == true? Maybe you can link it to the API stream, so you on each event you trigger the function until each order in your list no longer meets the previously stated condition?

Share:
310
hasib_ullah
Author by

hasib_ullah

Updated on January 01, 2023

Comments

  • hasib_ullah
    hasib_ullah over 1 year

    I am currently working on an iPad for a restaurant's order management. I am fetching the orders from an API and when there's a new order that order has a bool property isNew which is set to true. I am storing the new orders in a list called pendingOrders. I have created a customEndDrawer that only shows when there's a new order and it lets the user accept or reject the order. But it only works for single order. But I want to implement a system that will keep triggering the customEndDrawer until the pendingOrders list is empty. For example: If there are 2 orders in the pending ordersList the customEndDrawer will show up and let the user accept and reject the order. After users action it will again trigger with the new order details and let user accept or reject that order.

    What would be the best solution for implementing this system?