android – Flutter Replace ListView.builder primarily based on a variable

0
40


I’ve a fairly easy drawback. After I change a variable that will get assigned from a get request to my server, I would like the listview.builder to rerender the display. That is what my display seems to be like at the moment:
screen
(every information article (separated by a white sizedbox) is rendered primarily based on a variable referred to as _posts – when this variable will get up to date I would like all of the information widgets to replace)

EDIT: For instance when the consumer clicks the guts icon, I ship a request to the server to inform it that the consumer favored the information article, and when it comes again with the up to date favored listing, I would like the icon to be coloured in or not primarily based on what the server returns

MORE INFO

  • The widgets are inside a listview.builder
  • My class extends a stateful widget
  • The server returns a json object
  • I have been engaged on this for 8+ hours and may’t determine it out

Thanks a lot!