-
As far as I understand it, the However what if I want my list to container 2 or more different types of widgets? In that case my placeholder item would have to be either:
Going with option 1 seems like the reliable choice, but is annoying / feels ugly. Going with option 2 is clean and easy to write, I just always return a Curious if the above makes sense. Does anyone have experience doing something like this, and were there any clever solutions? Also, how much does instantiating a new widget with every |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 9 replies
-
The ideal option is a modified version of 2. Create both widgets in the CreateItem function and hide them. In your UpdateItem function you show/hide them as required. I think https://fynelabs.com/2022/12/30/building-complex-tables-with-fyne/ is useful. |
Beta Was this translation helpful? Give feedback.
The
CreateItem
callback should, in theory, be called roughly as many times as you have items visible on the screen (maybe a few more times). Memory usage should hopefully not be impacted too much.Before you try optimise things, make sure to benchmark it and not do any premature optimisation.