Skip to content

[image_picker] Migrate image_picker to package:cross_file #70886

@ditman

Description

@ditman

Use case

PickedFile has certain issues (like lacking some required metadata) and is only usable on the image_picker plugin.

package:cross_file is an evolved version of PickedFile that has more features, and is going to be used by more plugins, like: file_selector and camera.

Migrating image_picker to cross_file will allow image_picker to interop with the other plugins (for example: pick an image with image_picker, do some manipulations with it, and then save it to disk with file_selector!)

Proposal

  • Migrate the APIs from PickedFile to XFile. This will require a major version bump of the platform interface (hopefully, the last one!)
  • Migrate the Web plugin to return PickedFiles. This will require a major version bump.
  • Migrate the Core plugin to use PickedFile APIs. This will also require a major version bump of the plugin.
  • Use this opportunity to remove whatever 'deprecated' methods were added in the last migration.

(The null-safety migration period of this plugin would be a good time to do this migration)

Metadata

Metadata

Assignees

No one assigned

    Labels

    P3Issues that are less important to the Flutter projectc: new featureNothing broken; request for a new capabilityp: image_pickerThe Image Picker plugin.packageflutter/packages repository. See also p: labels.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions