getKeys method

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

Get all keys

Implementation

@override
Future<List<String>> getKeys() async {
  final path = await _storagePath;
  Directory dir = Directory(path);
  if (await dir.exists()) {
    return dir
        .listSync()
        .where((e) => e is File && e.path.endsWith('.boxx'))
        .map(
          (e) => File(e.path).uri.pathSegments.last.replaceFirst('.boxx', ''),
        )
        .toList();
  }
  return [];
}