filepicker_windows 2.1.0 copy "filepicker_windows: ^2.1.0" to clipboard
filepicker_windows: ^2.1.0 copied to clipboard

A package that allows file and directory selection for Windows using common dialog controls.

Dart | Windows

Package: filepicker_windows Publisher: win32.pub Language: Dart License: BSD-3-Clause

A package that provides a friendly Dart API for file and directory selection for Windows using common dialog controls.

This package builds on top of the Dart win32 package, offering a high-level Dart wrapper that avoids the need for users to understand FFI or write directly to the Win32 API.

Part of the Dart | Windows suite of Windows packages.

Usage #

File Picker #

Show a file picker dialog, allowing the user to select a file.

import 'package:filepicker_windows/filepicker_windows.dart';

void main() {
  final file = OpenFilePicker()
    ..filterSpecification = {
      'Word Document (*.doc)': '*.doc',
      'Web Page (*.htm; *.html)': '*.htm;*.html',
      'Text Document (*.txt)': '*.txt',
      'All Files': '*.*'
    }
    ..defaultFilterIndex = 0
    ..defaultExtension = 'doc'
    ..title = 'Select a document';

  final result = file.getFile();
  if (result != null) {
    print(result.path);
  }
}

Directory Picker #

Show a directory picker dialog, allowing the user to select a directory.

import 'package:filepicker_windows/filepicker_windows.dart';

void main() {
  final file = DirectoryPicker()..title = 'Select a directory';

  final result = file.getDirectory();
  if (result != null) {
    print(result.path);
  }
}

Additional examples can be located within the example\ directory.

For a more advanced demonstration, you can explore a Flutter application in the example\wallpaper\ directory. This application illustrates how to select an image file and set it as your desktop wallpaper.

Feature requests and bugs #

Please file feature requests and bugs at the issue tracker.

112
likes
0
pub points
90%
popularity

Publisher

verified publisherhalildurmus.dev

A package that allows file and directory selection for Windows using common dialog controls.

Homepage
Repository (GitHub)
View/report issues

Topics

#picker #win32 #ffi #windows

License

unknown (license)

Dependencies

ffi, win32

More

Packages that depend on filepicker_windows