orFalse

fun Boolean?.orFalse(defaultValue: Boolean = false): Boolean

Boolean Extension to show the original Boolean 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 false)

Parameters

defaultValue

Boolean the value we want in case the Boolean is null, by default it will be false