I have a ListView that where each item has a AsyncImage and a Label. While the images load it shows the layout with gaps between each item.
-------
Item
-------
Item
-------
When the first interaction happens (a scroll occurs), the layout refreshes and the gaps disappear.
-------
Item
-------
Item
-------
I'd really like to have the layout refresh when an image finishes loading. How do I refresh a layout?
Usually you can ask the widget to update it's canvas by calling widget.canvas.ask_update().
For a layout you could try triggering the layout of the widgets inside it by calling layout_instance.do_layout().
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With