from Asset
fun fromAsset(context: Context, assetName: String, anchor: Point? = null, scaledSize: Size? = null): Icon
Build an Icon from a file packaged under the app's assets/ directory.
Decodes synchronously on the calling thread — for large assets, invoke off the main thread.
val icon = Icon.fromAsset(context, "markers/store_pin.png")Content copied to clipboard
Throws
if the asset cannot be read or decoded.