mkiziltay
mkiziltay

Reputation: 63

flutter observable widget and refreshing widget state

Can someone help me to refresh card slider widget when added new card. I tried to use obx widget but something went wrong and got error. then i tried to refresh a text widget when added a new card but i couldn't refresh the text.

I want to make changes on this screen with Obx() widget.

I put some .obs variables but app not watching this variables. here i am sharing repository branch to yours to see project.

Upvotes: 0

Views: 120

Answers (1)

mkiziltay
mkiziltay

Reputation: 63

How to fix it: Already using stateful widget so if we want to refresh widget after get back to previous widget we put then function after MaterialPageRoute function.

set variables observable like Rxbool, RxInt or bool iswatching = true.obs. And then use Obx as Parent widget but never forget to use variable which is watching.

Upvotes: 0

Related Questions