Skip to content

flutter/packages

main
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Code

Latest commit

(This is the combination PR for overall review.)

This adds initial desktop support across all three desktop platforms:
- Adds the concept of a camera delegation as discussed in flutter/flutter#102115, and adds a helper base class at the platform interface level for implementations that want to use that approach. (Sharing it simplifies both the platform implementations and the client usage.)
- Adds a new app-facing and platform-interface API to check at runtime for support for a given source, to make writing code using `image_picker` in a world of dynamic camera support viable. (In particular this is critical for published packages that use `image_picker`, as they won't know in advance if a client app will have a delegate set up).
- Updates the Windows implementation to:
  - use the new delegation base class
  - implement the newer `getImageFromSource` API as an opportunistic fix while changing the code (if not implemented, it would fall back to `getImage`)
  - use new APIs in its example.
- Made macOS and Linux implementations that are clones of the Windows approach. They are both slightly simpler however, as MIME type (for Linux) and UTI (for macOS) allow creating generic "image" and "video" filters instead of having to hard-code a file extension list.

Since in my opinion this level of support is sufficient to allow basic real-world use of the desktop implementations, due to having a structure in place for handling camera support, this includes endorsing the desktop implementations. It is still the case that desktop does not support image resizing, which isn't ideal, but I don't think we should block on that. It is clearly documented in the README.

The desktop implementations are separate packages even though they are mostly the same right now because:
- the amount of (non-example) code being duplicated is small, and
- it makes it much easier for us to change platform implementations over time; e.g., recent versions of macOS support `PHPicker`, meaning we can later add native code for that to the macOS implementation, with just a fallback to the current `file_selector` wrapper. It's plausible that better native options for Windows and/or Linux may become available in the future as well.

Fixes flutter/flutter#102115
Fixes flutter/flutter#102320
Fixes flutter/flutter#85100
cd7b935

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
August 1, 2017 14:58

Flutter Packages

Build Status Release Status OpenSSF Scorecard

This repo is a companion repo to the main flutter repo. It contains the source code for Flutter's first-party packages (i.e., packages developed by the core Flutter team). Check the packages directory to see all packages.

These packages are also available on pub.

Issues

Please file any issues, bugs, or feature requests in the main flutter repo. Issues pertaining to this repository are labeled "package".

Contributing

If you wish to contribute a new package to the Flutter ecosystem, please see the documentation for developing packages. You can store your package source code in any GitHub repository (the present repo is only intended for packages developed by the core Flutter team). Once your package is ready you can publish to the pub repository.

If you wish to contribute a change to any of the existing packages in this repo, please review our contribution guide, and send a pull request.

Packages

These are the packages hosted in this repository:

Package Pub Points Popularity Issues Pull requests
animations pub package pub points popularity GitHub issues by-label GitHub pull requests by-label
camera pub package pub points popularity GitHub issues by-label GitHub pull requests by-label
cross_file pub package pub points popularity GitHub issues by-label GitHub pull requests by-label
css_colors pub package pub points popularity GitHub issues by-label GitHub pull requests by-label
cupertino_icons pub package pub points popularity GitHub issues by-label GitHub pull requests by-label
espresso pub package pub points popularity GitHub issues by-label GitHub pull requests by-label
extension_google_sign_in_as_googleapis_auth pub package pub points popularity GitHub issues by-label GitHub pull requests by-label
file_selector pub package pub points popularity GitHub issues by-label GitHub pull requests by-label
flutter_adaptive_scaffold pub package pub points popularity GitHub issues by-label GitHub pull requests by-label
flutter_image pub package pub points popularity GitHub issues by-label GitHub pull requests by-label
flutter_lints pub package pub points popularity GitHub issues by-label GitHub pull requests by-label
flutter_markdown pub package pub points popularity GitHub issues by-label GitHub pull requests by-label
flutter_plugin_android_lifecycle pub package pub points popularity GitHub issues by-label GitHub pull requests by-label
flutter_template_images pub package pub points popularity GitHub issues by-label GitHub pull requests by-label
go_router pub package pub points popularity GitHub issues by-label GitHub pull requests by-label
go_router_builder pub package pub points popularity GitHub issues by-label GitHub pull requests by-label
google_maps_flutter pub package pub points popularity GitHub issues by-label GitHub pull requests by-label
google_sign_in pub package pub points popularity GitHub issues by-label GitHub pull requests by-label
image_picker pub package pub points popularity GitHub issues by-label GitHub pull requests by-label
in_app_purchase pub package pub points popularity GitHub issues by-label GitHub pull requests by-label
ios_platform_images pub package pub points popularity GitHub issues by-label GitHub pull requests by-label
local_auth pub package pub points popularity GitHub issues by-label GitHub pull requests by-label
metrics_center pub package pub points popularity GitHub issues by-label GitHub pull requests by-label
multicast_dns pub package pub points popularity GitHub issues by-label GitHub pull requests by-label
palette_generator pub package pub points popularity GitHub issues by-label GitHub pull requests by-label
path_provider pub package pub points popularity GitHub issues by-label GitHub pull requests by-label
pigeon pub package pub points popularity GitHub issues by-label GitHub pull requests by-label
pointer_interceptor pub package pub points popularity GitHub issues by-label GitHub pull requests by-label
plugin_platform_interface pub package pub points popularity GitHub issues by-label GitHub pull requests by-label
quick_actions pub package pub points popularity GitHub issues by-label GitHub pull requests by-label
rfw pub package pub points popularity GitHub issues by-label GitHub pull requests by-label
shared_preferences pub package pub points popularity GitHub issues by-label GitHub pull requests by-label
standard_message_codec pub package pub points popularity GitHub issues by-label GitHub pull requests by-label
url_launcher pub package pub points popularity GitHub issues by-label GitHub pull requests by-label
video_player pub package pub points popularity GitHub issues by-label GitHub pull requests by-label
web_benchmarks pub package pub points popularity GitHub issues by-label GitHub pull requests by-label
webview_flutter pub package pub points popularity GitHub issues by-label GitHub pull requests by-label
xdg_directories pub package pub points popularity GitHub issues by-label GitHub pull requests by-label