getFiles method

Future<List<StorageFile>> getFiles()

Implementation

Future<List<StorageFile>> getFiles() async {
  List<StorageFile> files = [];
  ListResultForAll result = await listAll();
  for (var item in result.items) {
    await child(item.name).getMetadata().then((value) => files.add(
        StorageFile(
            cloudPath: "$fullPath/${item.name}",
            fileName: item.name,
            reference: item,
            size: value.size!)));
  }
  return files;
}