Flutter - How to show multiple pop up widgets one after another based on a list?
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?
hasib_ullah
Updated on January 01, 2023Comments
-
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 totrue
. I am storing the new orders in a list calledpendingOrders
. I have created acustomEndDrawer
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 thecustomEndDrawer
until thependingOrders
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?