orEmpty

fun Bitmap?.orEmpty(defaultValue: Bitmap = Bitmap.createBitmap(1, 1, Bitmap.Config.ARGB_8888)): Bitmap

Bitmap Extension to show the original Bitmap that we pass from the extension or in case of being null we will pass a default value. This default value can be the value you want or the defined one (this would be an empty one)

Parameters

defaultValue

Bitmap the value we want in case the Bitmap is null, by default it will be an empty one


fun ImageBitmap?.orEmpty(defaultValue: ImageBitmap = Bitmap.createBitmap(1, 1, Bitmap.Config.ARGB_8888).asImageBitmap()): ImageBitmap

ImageBitmap Extension to show the original ImageBitmap that we pass from the extension or in case of being null we will pass a default value. This default value can be the value you want or the defined one (this would be an empty one)

Parameters

defaultValue

ImageBitmap the value we want in case the Bitmap is null, by default it will be an empty one

See also