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, val tint: ComposeValue<Color> = { Colors.primary }) : ImageResource
Link copied to clipboard
data class Vector(val image: ImageVector, val contentDescription: StringResource, val tint: ComposeValue<Color> = { Colors.primary }) : ImageResource

Properties

Link copied to clipboard
Link copied to clipboard
abstract val identifier: String
Link copied to clipboard
abstract val tint: ComposeValue<Color>

Functions

Link copied to clipboard
open fun Content()
open override fun Content(modifier: Modifier)