-2

I have a code which can be seen here

trying to debug it I got this error, I don't know where I made mistake in the Obx function as started by flutter.

enter image description here

Upos Tyni
  • 63
  • 7

1 Answers1

0

Try to wrap the Scaffold into Obx if you need to update the state on whole widget tree or the ListTile to Update the specific widget.

RootKid87
  • 42
  • 4
  • I have already wrapped it as you can see – Upos Tyni Aug 10 '22 at 18:04
  • This is the code `return Scaffold( body: Obx( () => ListView.builder( itemCount: answersController.answersModel?.assets?.length ?? 0, itemBuilder: (context, index) { return ListTile( title: Text(answersController.answersModel?.assets![index].name ?? 'no desc'), ); }), ));` – Upos Tyni Aug 10 '22 at 18:05
  • No, can't see it. You wrap the ListView.builder() not the Scaffold. – RootKid87 Aug 10 '22 at 18:10