File Manager
FileManager is a wonderful widget that allows you to manage files and folders, pick files and folders, and do a lot more. Designed to feel like part of the Flutter framework.
Compatibility
Usage
pubspec.yaml
dependencies:
file_manager:
git:
url: https://developer.auroraos.ru/git/flutter/flutter-community-plugins/file_manager
ref: aurora-1.1.2
*.dart
FileManager(
controller: controller,
builder: (context, snapshot) {
final List<FileSystemEntity> entities = snapshot;
return ListView.builder(
itemCount: entities.length,
itemBuilder: (context, index) {
return Card(
child: ListTile(
leading: FileManager.isFile(entities[index])
? Icon(Icons.feed_outlined)
: Icon(Icons.folder),
title: Text(FileManager.basename(entities[index])),
onTap: () {
if (FileManager.isDirectory(entities[index])) {
controller.openDirectory(entities[index]); // open directory
} else {
// Perform file-related tasks.
}
},
),
);
},
);
},
),
The complete example is available here.