Need help creating widget with memory at runtime

Just store the settings in a datatable or (sketchy AF but should work) a variable on main then use that to rebuild the wodget properly wheneverbits called up.