putStringList static method

Future<bool> putStringList(
  1. String? key,
  2. List<String>? value
)

put string list. 存储sp中key的list

Implementation

static Future<bool> putStringList(String? key, List<String>? value) async {
  if (key == null || key.isEmpty || value == null) {
    return false;
  }
  return await _preferences.setStringList(key, value);
}