open_file_macos 0.2.0 copy "open_file_macos: ^0.2.0" to clipboard
open_file_macos: ^0.2.0 copied to clipboard

PlatformmacOS

A flutter plugin for macOS to open files or view files in Finder.

open_file_macos #

pub package

A flutter plugin for macOS to open files or view files in Finder.

Usage #

import 'package:open_file_macos/open_file_macos.dart';

final _openFileMacosPlugin = OpenFileMacos();
// Open a file.
await _openFileMacosPlugin.open('path/to/a/file');
// Show a path in Finder.
await _openFileMacosPlugin.open('path/to/a/file', viewInFinder: true);
// Path can be a file URL.
await _openFileMacosPlugin.open('file:///path/to/a/file', isFileURL: true);

Windows Support? #

As the package name suggests, this package only focuses on a clean implementation on macOS.

To open files on other platforms, you can find plenty of alternatives on pub.dev.

To view files in explorer on Windows:

await Process.run('explorer.exe', ['/select,$path']);
3
likes
160
points
1.39k
downloads

Publisher

verified publisherflutter-cavalry.com

Weekly Downloads

A flutter plugin for macOS to open files or view files in Finder.

Repository (GitHub)

Documentation

API reference

License

BSD-3-Clause (license)

Dependencies

flutter, plugin_platform_interface

More

Packages that depend on open_file_macos