|
SubcomposeAsyncImage(model: model, contentDescription: nil, loading: { _ in |
All asset images are being loaded with coil3.compose.SubcomposeAsyncImage.
As a result, when you navigate to the Image playground in the showcase, on Android, you see a layout shift as the asset images pop in, but on iOS, there isn't.
Ordinarily when using AsyncImage I'd use its placeholder: argument to prevent layout shift, but this is just a simple Image, so there's no way to use a placeholder.
Ideally, asset images should loaded synchronously by default. If not that, then there should be some way to load asset images synchronously. If not that, then there should at least be a way to provide a placeholder for asynchronously loaded asset images, and this should be documented.
skip-ui/Sources/SkipUI/SkipUI/Components/Image.swift
Line 155 in 6e2e63e
All asset images are being loaded with
coil3.compose.SubcomposeAsyncImage.As a result, when you navigate to the Image playground in the showcase, on Android, you see a layout shift as the asset images pop in, but on iOS, there isn't.
Ordinarily when using
AsyncImageI'd use itsplaceholder:argument to prevent layout shift, but this is just a simpleImage, so there's no way to use a placeholder.Ideally, asset images should loaded synchronously by default. If not that, then there should be some way to load asset images synchronously. If not that, then there should at least be a way to provide a placeholder for asynchronously loaded asset images, and this should be documented.