hasKey

fun hasKey(key: String?): Boolean

Checks if the shared preferences contain a specific key.

Return

true if the preference exists, false otherwise.

Parameters

key

The name of the preference to check.