peiffer-innovations / json_dynamic_widget

MIT License
226 stars 68 forks source link

button click change icon , first time click icon will change but second time change previous icon not change, please help me how to achive this. #304

Closed vijaymsc closed 4 months ago

vijaymsc commented 4 months ago

{ "type": "scaffold", "args": { "body": { "type": "center", "args": { "child": { "type": "container", "args": { "height": 100, "width": 250, "child": { "type": "set_default_value", "args": { "values": { "default": "upload", "nonDefault": "cancel" }, "child": { "type": "column", "args": { "children": [ { "type": "conditional", "listen": [ "upload", "cancel" ], "args": { "conditional": { "values": { "default": "upload" } }, "onTrue":{ "type": "icon_button", "args": { "iconSize": 80, "icon": { "type": "icon", "args": { "icon": { "codePoint": "0xe26e", "fontFamily": "MaterialIcons", "size": 50 } } }, "onPressed": "${set_value('default','nonDefault')}" } }, "onFalse":{ "type": "icon_button", "args": { "iconSize": 80, "icon": { "type": "icon", "args": { "icon": { "codePoint": "0xef28", "fontFamily": "MaterialIcons" } } }, "onPressed": "${set_value('nonDefault','default')}" } } } } ] } } } } } } } } } }

crisperit commented 4 months ago

Cannot do anything in a issue created like that

Please, create the branch with the example page that reproduces the issue - e.g and reopen when it'll be done https://github.com/peiffer-innovations/json_dynamic_widget/blob/main/json_dynamic_widget/example/assets/pages/issue_289.json