getStorageList function

Future<List<Directory>> getStorageList()

Return all paths

Implementation

Future<List<Directory>> getStorageList() async {
  List<Directory> paths = await (getExternalStorageDirectories() as FutureOr<List<Directory>>);
  List<Directory> filteredPaths = <Directory>[];
  for (Directory dir in paths) {
    filteredPaths
        .add(await getExternalStorageWithoutDataDir(dir.absolute.path));
  }
  return filteredPaths;
}