Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Features] Initial image zoom and other features #9

Closed
RoyalCoder88 opened this issue Apr 28, 2023 · 6 comments · Fixed by #50
Closed

[Features] Initial image zoom and other features #9

RoyalCoder88 opened this issue Apr 28, 2023 · 6 comments · Fixed by #50

Comments

@RoyalCoder88
Copy link

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
Copy link
Owner

LeGoffMael commented Apr 29, 2023

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
Copy link
Author

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
Copy link
Owner

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
Copy link

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
Copy link
Owner

LeGoffMael commented May 15, 2023

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 (LeGoffMael/video_editor#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 (fluttercandies/flutter_wechat_assets_picker#416), it might help you to achieve your goal.

@LeGoffMael
Copy link
Owner

Issue closed on favor of #42

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants