https://github.com/huynguyennovem/open_dir
Flutter plugin for opening native directory on desktop platforms.
https://github.com/huynguyennovem/open_dir
dart desktop-environment flutter flutter-plugin linux macos windows
Last synced: 2 months ago
JSON representation
Flutter plugin for opening native directory on desktop platforms.
- Host: GitHub
- URL: https://github.com/huynguyennovem/open_dir
- Owner: huynguyennovem
- Created: 2023-03-26T09:50:50.000Z (about 2 years ago)
- Default Branch: main
- Last Pushed: 2024-10-31T17:37:20.000Z (8 months ago)
- Last Synced: 2025-04-10T23:15:38.491Z (2 months ago)
- Topics: dart, desktop-environment, flutter, flutter-plugin, linux, macos, windows
- Language: C++
- Homepage: https://pub.dev/packages/open_dir
- Size: 257 KB
- Stars: 8
- Watchers: 3
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
## open_dir
Open directory on the native desktop platform with its app (Finder on MacOS, Files on Linux, File Explorer on Windows)
[](https://twitter.com/HuyNguyenTw)
### Supported platforms
MacOS | Linux | Windows | Android | iOS | Web |
| :-: | :---: | :-----: | :-----: | :-----: | :-----: |
| ✔️ | ✔️ | ✔️ | ❌️️ | ❌️️ | ❌️️ |### Usage
Add `open_dir` as a dependency in your `pubspec.yaml` file. This is [Endorsed federated plugin](https://docs.flutter.dev/development/packages-and-plugins/developing-packages#endorsed-federated-plugin).
This plugin is also supported to highlight/select a specific file after opening the directory.
### Example
```dart
final _openDirPlugin = OpenDir();
final path = '/path/to/directory';
final highlightedFileName = 'file.txt';
await _openDirPlugin.openNativeDir(path: path, highlightedFileName: highlightedFileName);
```### Demo
| Open dir | Open dir and highlight file |
| --------------- | --------------- |
|