rememberDrawablePainter

@Composable()
fun rememberDrawablePainter(drawable: Drawable?): Painter

Remembers Drawable wrapped up as a Painter. This function attempts to un-wrap the drawable contents and use Compose primitives where possible.

If the provided drawable is null, an empty no-op painter is returned.

This function tries to dispatch lifecycle events to drawable as much as possible from within Compose.

Samples

com.google.accompanist.sample.drawablepainter.BasicSample