LeGoffMael / insta_assets_picker

An image (and videos) picker similar with Instagram, supports multi picking, crop and aspect ratio.
https://pub.dev/packages/insta_assets_picker
MIT License
81 stars 37 forks source link

[Features] Initial image zoom and other features #9

Closed RoyalCoder88 closed 3 months ago

RoyalCoder88 commented 1 year ago

Hi @LeGoffMael, first thanks for your great package, I have a few questions:

  1. How can we disable the initial zoom of the picked image, because we are not able to get the full image, it's cropped by default and not able to fit especially when it's a portrait image.
  2. It's possible to add an overlay widget over the asset picker, like on Instagram? Screenshot_20230428_134723
  3. When will be available, videos picker?
  4. It's possible to add a custom widget in the list first like on wechat_assets_picker let's say for example for accessing the camera?

Thanks in advance!

LeGoffMael commented 1 year ago

Hi @RoyalCoder88,

I created this package because i needed a solution to ensure that the pictures picked by the user are either in 1/1 or 4/5 ratio. That's why video picker is not supported at the moment, because of the crop, maybe i could integrate it with my other package video_editor in the future, but it will need some rework of the crop view.

Regarding your questions:

  1. you would like to disable the crop action, right ?
  2. It could be an enchantment to add to look more like instagram
  3. probably not any time soon
  4. I think customSpecialItemPosition & customSpecialItemBuilder could be added easily to the pickAssets() function

I will try to look about those points soon but the video support will not be available any time soon i think.

RoyalCoder88 commented 1 year ago

Hi @LeGoffMael ,

Thanks for your quick reply,

  1. Yes to have the possibility to disable or enable it, not to load the picture directly with the initial zoom
  2. I think will be a great feature
  3. no worries
  4. great

Thanks a lot for your support!

LeGoffMael commented 1 year ago

You can now use specialItemBuilder and specialItemPosition in the latest 1.4.0.

InstaAssetPicker.pickAssets(
      context,
      title: 'Select images',
      specialItemBuilder: (context, asset, id) {
        return ElevatedButton(
            onPressed: () => print('test'),
            child: Text('mychild'),
        );
      },
      // since the list is revert, use prepend to be at the top
      specialItemPosition: SpecialItemPosition.prepend,
      onCompleted: (cropStream) { },
    ),

for the other feature i still have to think about it, removing the crop is kind of out of scope for this package, so i have to think about it. for the overlay, it also depends what you want, clicking on it will probably not trigger actions inside the picker easily.

lucapirolo commented 1 year ago

Hey @LeGoffMael,

Your package is seriously top-notch, and I appreciate how well you've put it together. I've been thinking it would be pretty sweet to have a video picker feature where we could choose the video's aspect ratio like instagram. Although, that's more of a nice-to-have, not a necessity. What's really key, though, is being able to use this one package to handle both photos and videos. Is there anyway i could support you and your work.

All the best, Luca

LeGoffMael commented 1 year ago

Hey @lucapirolo, thank you for the support.

Video crop support would be indeed a really nice feature to this package, but requires a lot of work and time that i unfortunately won't have soon. My plan is to adapt my other package video_editor, to use a similar UI than the one used in this package. I also have to think about the exportation process, if on the device or not. If you're motivated and want to help build this feature, you could check how to adapt the video_editor crop UI (https://github.com/LeGoffMael/video_editor/issues/114), if you could open a PR with this feature i would love to review it.

If you just want to display videos & images, you can look into the example i made in flutter_wechat_assets_picker. There is no crop action, but you can select either images, videos or both. Although it seems that there is some issue with the video player (https://github.com/fluttercandies/flutter_wechat_assets_picker/issues/416), it might help you to achieve your goal.

LeGoffMael commented 3 months ago

Issue closed on favor of #42