-
public final class NetworkImageKt
-
-
Method Summary
Modifier and Type Method Description final static UnitNetworkImage(String url, Modifier modifier, ContentScale contentScale, Color placeholderColor, String contentDescription)Network image composable for the SDK. -
-
Method Detail
-
NetworkImage
@Composable() final static Unit NetworkImage(String url, Modifier modifier, ContentScale contentScale, Color placeholderColor, String contentDescription)
Network image composable for the SDK.
SPEC-070-A A.3 — backed by Coil (io.coil-kt:coil-compose). The previous implementation re-ran
BitmapFactory.decodeStreamon every recomposition with no caching; Coil now handles HTTP, decoding, and memory + disk caching via the AppDNAImageLoader singleton (25% memory budget, 50 MB disk cache at<cacheDir>/appdna_image_cache).SPEC-070-A E.5 — adds GIF + SVG support:
GIF: registered as a Coil decoder in AppDNAImageLoader so the entire animation plays (not just the first frame).
SVG: detected by file extension on this side and rendered via
com.caverock.androidsvgto a Bitmap that we hand back to Compose as anImageBitmap. We deliberately don't ship a Coil SVG decoder factory because (a) only a tiny subset of console URLs are SVG today, (b) it keeps the Coil dep surface minimal, and (c)androidsvggives us deterministic sizing aligned to the Composable's layout bounds.
Public signature is preserved so all existing callers (paywall renderer, onboarding renderer, message renderer, video thumbnail, media block) work without changes — caller-supplied modifier and contentScale still pass through untouched.
-
-
-
-