getBoolean

open fun getBoolean(@NonNull key: String, defValue: Boolean): Boolean(source)

Retrieves a Boolean value from the data store.

Return

the value from the data store or the default return value

Parameters

key

The name of the preference to retrieve

defValue

Value to return if this preference does not exist in the storage

See also