Home > Blockchain >  How do I retrieve all files in a directory on Flutter web?
How do I retrieve all files in a directory on Flutter web?

Time:05-29

On Flutter mobile I would write something like this

final filesDir = Directory(path);
final List<FileSystemEntity> entities =
        await filesDir.list(recursive: true).toList();

It doesn't work on the web since dart.io is not available. Is it possible to do something similar on the web?

CodePudding user response:

I solved the problem by adding files to app assets.

  • Related