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.
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.
Answered By – Becca
This Answer collected from stackoverflow, is licensed under cc by-sa 2.5 , cc by-sa 3.0 and cc by-sa 4.0