First using an API I download a list of items, then I want to add a widget to add or quit but the system said I had to create a component from the counter widget, then I did it but when I compile the code and I reach the page I gives me and exemption:
setState() callback argument returned a Future.
The setState() method on _FlutterFlowCountControllerState#94cf6 was called with a closure or method that returned a Future. Maybe it is marked as "async".
Instead of performing asynchronous work inside a call to setState(), first execute the work (without updating the widget state), and then synchronously update the state inside a call to setState().