You need to be setting the text, brush and visibility in the updateInventoryWidgetIcon function.
You are only updating these elements in the preConstruct phase which happens once during the widget creation process.
Pretty much just move what you have in the preConstuct to the end of the update function.
What is set to the variable inventory icon? You do not promote the newly spawned widget to this variable yet you call update on it. Perhaps this is where the spit of logic is causing an empty ui element?
Try using break points (F9 on a node) and follow the logic.