CamoImage
A picture with a shape, a placeholder while it loads and an error look when it fails. contentDescription
describes it, or is null to hide a decorative image from screen readers; a failed image adds "could not
load". aspectRatio fixes the frame's proportions.
API
- Kotlin
- Dart
public fun CamoImage(
source: ImageSource,
contentDescription: String?,
modifier: Modifier = Modifier,
shape: ShapeRole = ShapeRole.Medium,
contentScale: ContentScale = ContentScale.Crop,
aspectRatio: Float? = null,
alignment: Alignment = Alignment.Center,
)
| Name | Type | Default |
|---|---|---|
source | ImageSource | required |
contentDescription | String? | |
modifier | Modifier | Modifier |
shape | ShapeRole | ShapeRole.Medium |
contentScale | ContentScale | ContentScale.Crop |
aspectRatio | Float? | null |
alignment | Alignment | Alignment.Center |
Design notes
Why CamoImage works this way, its states and its edge cases: contributor docs.