getInt

fun getInt(key: String, defaultValue: Int = 0): Int

Function to get Int value from preference

Return

Int from given key if exist, defaultValue if not

Parameters

key

String key to refer

defaultValue

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