getBoolean

fun getBoolean(key: String, defaultValue: Boolean = false): Boolean

Function to get Boolean value from preference

Return

Boolean from given key if exist, defaultValue if not

Parameters

key

String key to refer

defaultValue

Boolean to return if the key doesn't return any value