DrawableResourcesHolder

class DrawableResourcesHolder(resources: Map<String, DrawableResource>)

Resolves the plain string name the Image tile's resourceName field references to an actual app-bundled DrawableResource — the mechanism behind Image (as opposed to AsyncImage, which loads from a URL/bytes and doesn't need this holder). A single Koin single, built once at startup from MosaicDependencyInjectionConfig.drawableResources.

Parameters

resources

every registered name → drawable mapping, supplied by the app host.

Constructors

Link copied to clipboard
constructor(resources: Map<String, DrawableResource>)

Functions

Link copied to clipboard
operator fun get(name: String): DrawableResource?

Looks up the drawable registered under name.