getString static method

String? getString(
  1. String key, {
  2. String? defValue,
})

get string. 获取sp中key的字符串

Implementation

static String? getString(String key, {String? defValue}) =>
    _prefs.getString(key) ?? defValue;