Viewing version 0.2.2+1. Open the latest package page.
image_picker_macos
0.2.2+1macOS platform implementation of image_picker
Readme
image_picker_macos
A macOS implementation of image_picker.
Limitations
ImageSource.camera is not supported unless a cameraDelegate is set.
pickImage()
The arguments maxWidth, maxHeight, and imageQuality are not currently supported.
pickVideo()
The argument maxDuration is not currently supported.
Usage
Import the package
This package is endorsed, which means you can simply use image_picker
normally. This package will be automatically included in your app when you do,
so you do not need to add it to your pubspec.yaml.
However, if you import this package to use any of its APIs directly, you
should add it to your pubspec.yaml as usual.
Entitlements
This package is currently implemented using file_selector, so you will
need to add a read-only file acces entitlement:
<key>com.apple.security.files.user-selected.read-only</key>
<true/>
Alternatives
If you would prefer an implementation that uses the dedicated photo picker UI available in newer versions of macOS, which is more similar to the iOS experience, you may want to consider using an alternate, unendorsed implementation built by the community.
Changelog
0.2.2+1
- Updates minimum supported version to macOS 10.15.
- Updates minimum supported SDK version to Flutter 3.35/Dart 3.9.
0.2.2
- Adds support for
getMultiVideoWithOptions. - Updates minimum supported SDK version to Flutter 3.27/Dart 3.6.
0.2.1+2
- Updates README to reference alternate implementations.
- Updates minimum supported SDK version to Flutter 3.22/Dart 3.4.
0.2.1+1
- Adds pub topics to package metadata.
- Updates minimum supported SDK version to Flutter 3.7/Dart 2.19.
0.2.1
- Adds
getMediamethod.
0.2.0
- Implements initial macOS support.
Installing
export PUB_HOSTED_URL=https://pub.mirror.p-hatan.ir
flutter pub add 'image_picker_macos:0.2.2+1'pubspec.yaml
name: image_picker_macos
description: macOS platform implementation of image_picker
repository: https://github.com/flutter/packages/tree/main/packages/image_picker/image_picker_macos
issue_tracker: https://github.com/flutter/flutter/issues?q=is%3Aissue+is%3Aopen+label%3A%22p%3A+image_picker%22
version: 0.2.2+1
environment:
sdk: ^3.9.0
flutter: ">=3.35.0"
flutter:
plugin:
implements: image_picker
platforms:
macos:
dartPluginClass: ImagePickerMacOS
dependencies:
file_selector_macos: ^0.9.1+1
file_selector_platform_interface: ^2.3.0
flutter:
sdk: flutter
image_picker_platform_interface: ^2.11.0
dev_dependencies:
build_runner: ^2.1.5
flutter_test:
sdk: flutter
mockito: ^5.4.4
topics:
- image-picker
- files
- file-selection
Version history
Dependencies
file_selector_macos "^0.9.1+1"
file_selector_platform_interface "^2.3.0"
flutter {
"sdk": "flutter"
}
image_picker_platform_interface "^2.11.0"