getInt static method

int getInt(
  1. String key, {
  2. int defValue = 0,
})

get int. 获取sp中key的int值

Implementation

static int getInt(String key, {int defValue = 0}) =>
    _prefs.getInt(key) ?? defValue;