AiutaIcon

class AiutaIcon(val iconResource: AiutaDrawableResource, val shouldDrawAsIs: Boolean = false)

Immutable class representing an icon with rendering configuration.

This class wraps an AiutaDrawableResource and provides additional metadata about how the icon should be rendered, particularly whether it should be drawn as-is or can be modified (tinted).

// Icon that can be tinted
val editIcon = AiutaIcon(
iconResource = AiutaComposeDrawableResource(Res.drawable.ic_edit),
shouldDrawAsIs = false
)

// Icon that should be drawn exactly as provided (e.g., logo, photo)
val logoIcon = AiutaIcon(
iconResource = AiutaComposeDrawableResource(Res.drawable.company_logo),
shouldDrawAsIs = true
)

// Using default behavior (can be modified)
val defaultIcon = AiutaIcon(
iconResource = AiutaAndroidDrawableRes(R.drawable.ic_star)
)

See also

Constructors

Link copied to clipboard
constructor(iconResource: AiutaDrawableResource, shouldDrawAsIs: Boolean = false)

Properties

Link copied to clipboard

The drawable resource containing the icon

Link copied to clipboard
val shouldDrawAsIs: Boolean = false

Whether the icon should be drawn exactly as provided without modifications