So say I have a simple app with 2 routes. The home route is profile and the second is items. So the idea is that when the user clicks in the item icon the app should move to that route and display all the user's items. The question is should this item Widget be Stateless or Stateful? Take in consideration that I expect the user to pull to refresh this Route and reload the api in the Listview.
CodePudding user response:
It should definitely be a Stateful widget since you are expecting data from an API. A stateless widget can't change, you should only use a Stateless widget if the data on the page is static.
CodePudding user response:
Its definitely an stateful widget because stateless widget can't change their state.