Closed WiRight closed 10 months ago
Hi @WiRight, thank you for submitting the issue.
I think it is caused because the widget is not rebuilt. so initVal
doesn't change.
for a simple solution, you can force rebuild the InputQty
widget every time it receives a new initVal
value. to do that, just specify the key
property.
InputQty(
key: ValueKey("$streamedInitVal"), // every different value key will force to rebuild the widget.
initVal: streamedInitVal,
),
I will try to develop a new feature to extract TexteditingController
, so that it is available from outside the package. but it may take time
@pmatatias hey and thanks for the quick response! using key solved my problem now!
Glad to help. I'll mark it as closed for now.
In my case i getting new value from another place (for example: websocket) And setting value as
initVal
has no effectHow set new value outside? (Something like controller?)