stringList method

Future<List<String>?> stringList(
  1. String key, [
  2. Iterable<String>? data
])

Implementation

Future<List<String>?> stringList(String key, [Iterable<String>? data]) async {
  final shared = await this;
  if (data.isNotNullOrEmpty) {
    await shared.setStringList(key, data!.toList());
    return data.toList();
  } else {
    return shared.getStringList(key);
  }
}