optional

inline fun <Resource : Any> Skin.optional(name: String = defaultStyle): Resource?

Utility function that makes it easier to access Skin assets or return null if they don't exist.

Return

resource of the specified type with the selected name, or null if it doesn't exist.

Parameters

name

name of the requested resource. Defaults to defaultStyle.