nashihu
nashihu

Reputation: 849

can we use Google Photos as Image Picker in Flutter?

My designer came up with this design

enter image description here

i've tried to use library image_picker & file_picker but looks like it doesn't satisfy my needs so far

let's say i create the bottomsheet at image above, so how do i programmatically use Google Photos as Image Picker? tthanks

Upvotes: 2

Views: 299

Answers (1)

Luke Hutchison
Luke Hutchison

Reputation: 9230

The file_picker 3rd party package can get photos from Google Photos (or any other app that supports the image picking Android intent), using:

await FilePicker.platform.pickFiles(type: FileType.image)

The image_picker official Flutter image picker package cannot get photos from Google Photos, it can only get photos from the gallery, because it uses a more limited Android intent, and the Google Flutter team seem to have no intention to fix this.

In my app, I offer the user three different image picker options:

  1. Pick from camera (using image_picker)
  2. Pick from gallery (using image_picker)
  3. Pick from other app (using file_picker, with type: FileType.image)

Upvotes: 0

Related Questions