getx icon indicating copy to clipboard operation
getx copied to clipboard

How can i force update the Obx value?

Open billbull21 opened this issue 2 years ago • 3 comments

i have a linearprogressindicator to show the progress of uploading a file in my app.

image

i've tried to log the value inside my function. turns out Obx widget only rebuild 2x, first and last. may be it is because "lazy" update feature on getx.

image the red arrow shows log from Obx() widget.

but i wanna rebuild as fast as i want. how can i do that ?

billbull21 avatar Dec 29 '22 09:12 billbull21

i have a linearprogressindicator to show the progress of uploading a file in my app.

image

i've tried to log the value inside my function. turns out Obx widget only rebuild 2x, first and last. may be it is because "lazy" update feature on getx.

image the red arrow shows log from Obx() widget.

but i wanna rebuild as fast as i want. how can i do that ?

Get.update(); Or Get.forceAppUpdate()

kauemurakami avatar Jan 18 '23 05:01 kauemurakami

Force update the variable.

stnkUpload.refresh();

princer007-GoS avatar Mar 24 '23 21:03 princer007-GoS

Force update the variable.

stnkUpload.refresh();

Thanks worked for me

mfarhanjutt avatar Sep 11 '24 05:09 mfarhanjutt