getAll method

  1. @override
Future<List<String>> getAll()

Implementation

@override
Future<List<String>> getAll() async {
  await init();
  var items = <String>[];
  var keys = _prefs!
      .getKeys()
      .where((element) => element.startsWith(_prefix))
      .toList();
  for (var key in keys) {
    var item = await read(key);
    if (item != null) {
      items.add(item);
    }
  }
  return items;
}