ImageResource

@Immutable
sealed interface ImageResource

A sealed class to represent an image resource. It can be either a vector image or a drawable. This is useful to abstract the image resource type and use it in a composable function. The identifier can be used for tests.

See also

Inheritors

Types

Link copied to clipboard
data class Drawable(@DrawableRes val resId: Int, val contentDescription: StringResource) : ImageResource
Link copied to clipboard
data class Vector(val image: ImageVector, val contentDescription: StringResource) : ImageResource

Properties

Link copied to clipboard
Link copied to clipboard
abstract val identifier: String