flutter_file_info 0.0.1 copy "flutter_file_info: ^0.0.1" to clipboard
flutter_file_info: ^0.0.1 copied to clipboard

A Flutter plugin for retrieving detailed file metadata, including native icons.

header

Flutter Windows Tests

flutter_file_info #

A Flutter plugin for retrieving detailed file metadata, including native icons. Ideal for applications needing file information and icons.

Currently supported features #

  • Access to native file icons.
  • Retrieval of detailed file metadata.

Compatibility Chart #

API Android iOS Linux macOS Windows Web
getFileIconInfo() ✔️
getFileInfo() ✔️

Getting Started #

Usage #

Quick simple usage example:

Multiple files

IconInfo? _iconInfo = await FileInfo.instance.getFileIconInfo('path/to/example/file.txt');

Widget _buildFileIcon() {
    if (_iconInfo == null) return const SizedBox.shrink();
    return Image.memory(
      _iconInfo!.pixelData,
      width: _iconInfo!.width.toDouble(),
      height: _iconInfo!.height.toDouble(),
    );
  }

Single file

FileMetadata? _fileMetatdata = await FileInfo.instance.getFileInfo('path/to/example/file.txt');

if (_fileMetatdata != null) {
    pritn(fileMetadata.fileName);                    // Output: file.txt
    pritn(fileMetadata.fileExtension);               // Output: txt
    pritn(fileMetadata.fileType);                    // Output: TextDocument
    pritn(fileMetadata.creationTime?.toString());    // Output: 2024-08-01 17:16:26.500018
    // ...
}

Screenshots #

Windows #

windows_example

Contributing #

If you would like to contribute to the development of this plugin, please fork the repository and submit a pull request. For detailed contribution guidelines, please refer to the CONTRIBUTING.md file.

License #

This plugin is licensed under the MIT License.

5
likes
0
pub points
0%
popularity

Publisher

verified publisherjackowski.dev

A Flutter plugin for retrieving detailed file metadata, including native icons.

Repository (GitHub)
View/report issues

License

unknown (license)

Dependencies

equatable, ffi, flutter, image, plugin_platform_interface, win32

More

Packages that depend on flutter_file_info