Skip to content

Commit ecf2b68

Browse files
[image_picker] Add desktop support - implementations (#4172)
Platform implementation portion of #3882 Updates the Windows implementation to use the new base class for camera delegation, and creates new macOS and Linux implementations that are near-duplicates. These are separate packages, rather than a single shared package, because it's likely that they will diverge over time (e.g., the TODO for macOS to use a system image picker control on newer versions of macOS), and the amount of code that could be shared is minimal anyway. Part of flutter/flutter#102115 Part of flutter/flutter#102320 Part of flutter/flutter#85100
1 parent 914d120 commit ecf2b68

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

59 files changed

+3806
-116
lines changed
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
# Below is a list of people and organizations that have contributed
2+
# to the Flutter project. Names should be added to the list like so:
3+
#
4+
# Name/Organization <email address>
5+
6+
Google Inc.
7+
Alexandre Zollinger Chohfi <[email protected]>
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
## 0.2.0
2+
3+
* Implements initial Linux support.
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
Copyright 2013 The Flutter Authors. All rights reserved.
2+
3+
Redistribution and use in source and binary forms, with or without modification,
4+
are permitted provided that the following conditions are met:
5+
6+
* Redistributions of source code must retain the above copyright
7+
notice, this list of conditions and the following disclaimer.
8+
* Redistributions in binary form must reproduce the above
9+
copyright notice, this list of conditions and the following
10+
disclaimer in the documentation and/or other materials provided
11+
with the distribution.
12+
* Neither the name of Google Inc. nor the names of its
13+
contributors may be used to endorse or promote products derived
14+
from this software without specific prior written permission.
15+
16+
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
17+
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
18+
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
19+
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
20+
ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
21+
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
22+
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
23+
ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
24+
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
25+
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
# image\_picker\_linux
2+
3+
A Linux implementation of [`image_picker`][1].
4+
5+
## Limitations
6+
7+
`ImageSource.camera` is not supported unless a `cameraDelegate` is set.
8+
9+
### pickImage()
10+
The arguments `maxWidth`, `maxHeight`, and `imageQuality` are not currently supported.
11+
12+
### pickVideo()
13+
The argument `maxDuration` is not currently supported.
14+
15+
## Usage
16+
17+
### Import the package
18+
19+
This package is [endorsed][2], which means you can simply use `file_selector`
20+
normally. This package will be automatically included in your app when you do,
21+
so you do not need to add it to your `pubspec.yaml`.
22+
23+
However, if you `import` this package to use any of its APIs directly, you
24+
should add it to your `pubspec.yaml` as usual.
25+
26+
[1]: https://pub.dev/packages/image_picker
27+
[2]: https://flutter.dev/docs/development/packages-and-plugins/developing-packages#endorsed-federated-plugin
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
# Platform Implementation Test App
2+
3+
This is a test app for manual testing and automated integration testing
4+
of this platform implementation. It is not intended to demonstrate actual use of
5+
this package, since the intent is that plugin clients use the app-facing
6+
package.
7+
8+
Unless you are making changes to this implementation package, this example is
9+
very unlikely to be relevant.

0 commit comments

Comments
 (0)