F

file_manager

FileManager is a wonderful widget that allows you to manage files and folders, pick files and folders, and do a lot more.

EN | RU

file_manager

File Manager is a Flutter widget that provides file system browsing and management functionality for Aurora OS, Android, and Linux devices. The plugin offers a customizable UI for navigating directories, viewing files, and performing file operations with sorting capabilities.

Usage example:

final FileManagerController controller = FileManagerController();

FileManager(
  controller: controller,
  builder: (context, snapshot) {
    return ListView.builder(
      itemCount: snapshot.files.length,
      itemBuilder: (context, index) {
        final file = snapshot.files[index];
        return ListTile(
          leading: Icon(file.isDirectory ? Icons.folder : Icons.insert_drive_file),
          title: Text(file.name),
          subtitle: Text(file.sizeFormatted),
          onTap: () {
            if (file.isDirectory) {
              controller.openDirectory(file);
            }
          },
        );
      },
    );
  },
)

Contents

Installation and build

Add the plugin depending on the target application in the pubspec.yaml file:

dependencies:
  file_manager:
    git:
      url: https://developer.auroraos.ru/git/flutter/flutter-community-plugins/file_manager.git

And update the dependencies:

flutter pub get

Detailed description

The File Manager plugin provides a comprehensive set of features for file system navigation and management:

Key Features:

  • File System Navigation: Browse directories and traverse the file system hierarchy
  • Customizable UI: Builder pattern allows complete control over the file list appearance
  • File Sorting: Sort files and folders by name, date, type, or size
  • Storage Access: Access to different storage locations on the device
  • Platform Support: Works on Aurora OS, Android, and Linux platforms
  • File Information: Display file sizes, types, and modification dates
  • Hidden Files: Option to show or hide hidden files and directories

Main Components:

  • FileManager Widget: Main UI component for displaying file contents
  • FileManagerController: Handles navigation state and file operations
  • SortBy Enum: Defines sorting options (name, date, type, size)
  • FileSystem Extensions: Utility methods for file operations

Integration:

The plugin seamlessly integrates with Flutter applications and follows Material Design guidelines. It provides callbacks for file selection, navigation events, and error handling.

Compatibility

The plugin has been working correctly since the 5.0.0 version of the Aurora OS.

Requirements

  • Flutter: 3.32.7 or higher
  • Aurora OS: 5.0.0 or higher

Terms of Use and Participation

The source code of the project is provided under the license, that allows it to be used in third-party applications.

To participate in the development of the project, please read the contributor agreement. If you plan to contribute your own source code to the project, you will need to accept the CLA agreement.

For information about contributors see AUTHORS.

Code of conduct is a current set of rules of the Open Mobile Platform which informs you how we expect the members of the community will interact while contributing and communicating.