Giter VIP home page Giter VIP logo

legoffmael / insta_assets_picker Goto Github PK

View Code? Open in Web Editor NEW
79.0 79.0 34.0 10.22 MB

An image (and videos) picker similar with Instagram, supports multi picking, crop and aspect ratio.

Home Page: https://pub.dev/packages/insta_assets_picker

License: MIT License

Kotlin 0.15% Swift 0.48% Objective-C 0.05% Dart 97.70% Ruby 1.63%
crop crop-image dart flutter instagram multiple-assets photomanager picker

insta_assets_picker's People

Contributors

alexv525 avatar juarezfranco avatar legoffmael avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

insta_assets_picker's Issues

[Features] Initial image zoom and other features

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!

[Feature] Images is loading very slow

In my iphone i have approx 20k image stored . when i use this in my flutter application it take approx 5-10 min to load the images.
so my concern is only , this is not bug this is just feature can we implement kind of pagination or limit to load images .

The restorable picker is not responding when opened for the first time, showing an empty list.

@LeGoffMael ๐Ÿ‘€

When I open the Restore Picker asset for the first time in the phone, it shows me an empty list and after killing the app and opening it again, it works perfectly. This works fine in all types of pickers, only the problem is in restorable pickers.

Steps :

  1. Install the Fresh app and open the restore picker, this problem will replicate.
  2. Close the app and open it again, this problem is gone.

Note : - The issue only occurs on a fresh install when the app is opened for the first time.

Please Fix this issue ASAP because my whole project depends on this package

Use Package Version : - insta_assets_picker: ^2.3.0

See Image๐Ÿ‘‡๐Ÿ‘‡๐Ÿ‘‡๐Ÿ‘‡๐Ÿ‘‡๐Ÿ‘‡๐Ÿ‘‡๐Ÿ‘‡๐Ÿ‘‡๐Ÿ‘‡

IMG_1366

Problem with permissions on android

The permission check is checking the common type (video and image).

In the latest version of the wechat_assets_picker lib it is now possible to specify only image type permission

Permission state error with PermissionState.denied when using Android API 33.

Hello,

It seems there is an issue after granting permission of photos on Android API 33. Please consider the changes of permission request from API 32 for storage and photos.

E/flutter (11879): [ERROR:flutter/runtime/dart_vm_initializer.cc(41)] Unhandled Exception: Bad state: Permission state error with PermissionState.denied.
E/flutter (11879): #0 AssetPickerDelegate.permissionCheck (package:wechat_assets_picker/src/delegates/asset_picker_delegate.dart:40:7)
E/flutter (11879):
E/flutter (11879): #1 AssetPickerDelegate.pickAssetsWithDelegate (package:wechat_assets_picker/src/delegates/asset_picker_delegate.dart:157:5)
E/flutter (11879):
E/flutter (11879): #2 openGallery.picker (package:battuta/src/services/gallery_service.dart:48:7)

Not working in Chrome

I have run the app, and tried with Chrome. But Camera Picker did not work. Help me

Screenshot 2023-11-24 at 18 33 30

Documentation, comments

Documentation must be improved. Mostly restorableAssetsPicker() and pickAssets().

20% or more of the public API must be commented to get the required points in pub.dev

Build Error with AGP 8.0+: Namespace not specified

Hello,

I've recently updated my project's Flutter version and the Android Gradle Plugin to the latest version, and after doing so, I encountered a build issue with the insta_assets_picker package. The error occurs when trying to configure the project:

A problem occurred configuring project ':insta_assets_picker'.

Could not create an instance of type com.android.build.api.variant.impl.LibraryVariantBuilderImpl.
Namespace not specified. Specify a namespace in the module's build file. See https://d.android.com/r/tools/upgrade-assistant/set-namespace for information about setting the namespace.

It seems that the newer version of AGP requires a namespace declaration in the module's build.gradle file. Here is the environment in which the error occurred:

  • Flutter Version: 3.16.5
  • Dart Version: 3.2.3
  • Android Gradle Plugin Version: 8.1.2
  • insta_assets_picker Version: 2.3.0-dev.1

According to the Android documentation on namespaces, this is a new requirement starting with AGP 8.0.

Could you please look into this issue? If it's a matter of updating the package to support the latest AGP requirements, an update would be greatly appreciated. I rely on insta_assets_picker for my project, and this build issue is a blocker for me.

Thank you for your work on this package and for any assistance you can provide.

Best regards,
Ayman

when adding the new version then throwing the bellow issue.

Resolving dependencies...
Because insta_assets_picker >=1.6.0 depends on extended_image ^8.1.0 which depends on extended_image_library ^3.6.0, insta_assets_picker >=1.6.0 requires extended_image_library ^3.6.0.
And because extended_image_library >=3.5.3 <4.0.0-dev depends on http_client_helper ^3.0.0 which depends on http ^1.0.0, insta_assets_picker >=1.6.0 requires http ^1.0.0.
So, because secondfit depends on both http ^0.13.5 and insta_assets_picker ^2.1.0, version solving failed.


You can try the following suggestion to make the pubspec resolve:
* Consider downgrading your constraint on insta_assets_picker: flutter pub add insta_assets_picker:^1.5.2

When completed it fires twice

Should this be the expected behavior?
code:

onCompleted: (Stream<InstaAssetsExportDetails> stream) {
          print(stream);
          stream.listen((InstaAssetsExportDetails event) async {
            print(event.progress);

output:

flutter: Instance of '_ControllerStream<InstaAssetsExportDetails>'
flutter: 0.0
flutter: 1.0  
flutter: 1.0

Request for Assistance: Implementing Pinch-Zoom(Crop) Feature on Images

Dear @LeGoffMael ,

I hope this message finds you well. My name is Rohan, and I am an enthusiastic developer and a user of your fantastic insta_assets_picker on GitHub. I've been exploring your repository and found it to be an excellent resource for pinch to crop an image.

I am currently working on a project that requires the implementation of a pinch-zoom(crop) feature for images, and I believe your expertise in this area could be immensely valuable. I have seen the exemplary code and solutions you've provided in the past, and I was wondering if you could spare a moment to guide me on how to achieve this functionality in my project.

My intention is to allow users to interactively pinch and zoom (crop)into images, offering a seamless and intuitive user experience. Since you have demonstrated proficiency in similar areas within your repository, I am hopeful that you could share some insights, code snippets, or pointers to libraries that could help me accomplish this task.

Warm regards,
Rohan Darji

[Feature] - SingleMode

when maxAsset is set to 1, When user select new image, prevSelect should get replaced and possiblly remove the showing of count as well for GridView for when single Mode isEnabled

In weChat they use isSingleModel which then uses maxAssets

iOS error in log on crop

When cropping multiple files it sometime an error is logged (however the images seems to be cropped properly)

The error seems to logged here
https://github.com/lykhonis/image_crop/blob/master/ios/Classes/ImageCropPlugin.m#L176

IOSurface creation failed: e00002c2 parentID: 00000000 properties: {
    IOSurfaceAddress = 5795512320;
    IOSurfaceAllocSize = 20775279;
    IOSurfaceCacheMode = 0;
    IOSurfaceMapCacheAttribute = 1;
    IOSurfaceName = CMPhoto;
    IOSurfacePixelFormat = 1246774599;
}

version 2.0.0 ios photo_manager error

In version 2.0.0, the following error occurs:

โ•โ•โ•โ•โ•โ•โ•โ• Exception caught by photo_manager โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•
The following StateError was thrown:
Bad state: The data of the entity is null: AssetEntity(id: 8362C97A-44D9-4322-8CF2-4ECD1F9362AD/L0/001 , type: AssetType.image)

When the exception was thrown, this was the stack
#0      AssetEntityImageProvider._loadAsync
image_provider.dart:128
<asynchronous suspension>
โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•
[โœ“] Flutter (Channel stable, 3.13.4, on macOS 13.4.1 22F770820d darwin-arm64
    (Rosetta), locale ko-KR)
[!] Android toolchain - develop for Android devices (Android SDK version 33.0.0)
    โœ— cmdline-tools component is missing
      Run `path/to/sdkmanager --install "cmdline-tools;latest"`
      See https://developer.android.com/studio/command-line for more details.
    โœ— Android license status unknown.
      Run `flutter doctor --android-licenses` to accept the SDK licenses.
      See https://flutter.dev/docs/get-started/install/macos#android-setup for
      more details.
[โœ“] Xcode - develop for iOS and macOS (Xcode 14.3.1)
[โœ“] Chrome - develop for the web
[โœ“] Android Studio (version 2021.3)
[โœ“] VS Code (version 1.82.2)
[โœ“] Connected device (3 available)
[โœ“] Network resources

Request for video support

Are there any plans on releasing support for video?

Would be insanely helpful, also since the wechat_assets_picker library supports it

When implement this package in my flutter project throughing bellow error :- ( Error: 'ImageTilingInfo' isn't a type. final ImageTilingInfo info =)

**Launching lib/main.dart on ONEPLUS A6000 in debug mode...
Running Gradle task 'assembleDebug'...
../../../.pub-cache/hosted/pub.dev/extended_image-8.0.1/lib/src/image/painting.dart:202:13: Error: 'ImageTilingInfo' isn't a type.
      final ImageTilingInfo info =
            ^^^^^^^^^^^^^^^
../../../.pub-cache/hosted/pub.dev/extended_image-8.0.1/lib/src/image/
painting.dart:203:11: Error: Method not found: 'createTilingInfo'.
          createTilingInfo(repeat, rect, destinationRect, sourceRect);
          ^^^^^^^^^^^^^^^^
../../../.pub-cache/hosted/pub.dev/extended_image-8.0.1/lib/src/extended_image.dart:976:36: Error: The argument type 'BorderRadius?' can't be assigned to the parameter type 'BorderRadiusGeometry' because 'BorderRadius?' is nullable and 'BorderRadiusGeometry' isn't.
 - 'BorderRadius' is from 'package:flutter/src/painting/border_radius.dart' ('../../flutter/packages/flutter/lib/src/painting/border_radius.dart').
 - 'BorderRadiusGeometry' is from 'package:flutter/src/painting/border_radius.dart' ('../../flutter/packages/flutter/lib/src/painting/border_radius.dart').
              borderRadius: widget.borderRadius,
                                   ^
Target kernel_snapshot failed: Exception


FAILURE: Build failed with an exception.

* Where:
Script '/Users/mac/Downloads/flutter/packages/flutter_tools/gradle/src/main/groovy/flutter.groovy' line: 1297

* What went wrong:
Execution failed for task ':app:compileFlutterBuildDebug'.
> Process 'command '/Users/mac/Downloads/flutter/bin/flutter'' finished with non-zero exit value 1

* Try:
> Run with --stacktrace option to get the stack trace.
> Run with --info or --debug option to get more log output.
> Run with --scan to get full insights.

* Get more help at https://help.gradle.org

BUILD FAILED in 2s
Exception: Gradle task assembleDebug failed with exit code 1**
Screenshot 2023-08-24 at 5 27 26 PM

[Enhancement] Support for Flutter 3.10.0

wechat_assets_picker: ^8.5.0

to support flutter latest stable version 3.10.0, please upgrade wechat_assets_picker package to 8.5.0

as Flutter community have done incredible work in 3.10.0 like impeller engine support in stable channel in ios, performance improvement, fast page load time in flutter web.

Thank you.

crop code

I'm building my own app in that I want to use this insta picker cropping functionality how can I do that any help?

i got that error

Could not build the precompiled application for the device.
Error (Xcode): ../../.pub-cache/hosted/pub.dev/photo_manager-2.7.2/lib/src/internal/image_provider.dart:72:28: Error: The parameter 'decode' of the method 'AssetEntityImageProvider.load' has type 'Future Function(ImmutableBuffer, {TargetImageSize Function(int, int)? getTargetSize})', which does not match the corresponding type, 'Future Function(Uint8List, {bool allowUpscaling, int? cacheHeight, int? cacheWidth})', in the overridden method, 'ImageProvider.load'.

Error launching application on iPhone 14 Pro.

[Features] restorableAssetsPicker in version [2.0.0, 1.5.2]

Hi @LeGoffMael,
First thanks for your great package, I have found problem about function restorableAssetsPicker.

  • I set default ratio as cropDelegate: const InstaAssetCropDelegate(cropRatios: [4 / 5, 1 / 1]).
  • In the application, I selected image, changed ratio to 1:1 and confirmed .
  • i disposed function(insta_assets_picker), Then re-opened Images picker.
  • The image show ratio 1:1, but button display 4:5.
  • I expect the button to display 1:1.

For your better understanding, here is my code:

InstaAssetPicker.restorableAssetsPicker(
      context,
      title: 'Select Images',
      closeOnComplete: true,
      provider: _provider!,
      cropDelegate: const InstaAssetCropDelegate(cropRatios: [4 / 5, 1 / 1]),
      onCompleted: (events) { }
);
**Flutter doctor**
[!] Flutter (Channel stable, 3.13.4, on macOS 13.5.2 22G91 darwin-arm64, locale en-TH)
    ! Warning: `flutter` on your path resolves to /fvm/versions/3.10.6/bin/flutter, which is not inside your current Flutter SDK checkout at /fvm/versions/3.13.4. Consider adding /fvm/versions/3.13.4/bin to the front of your path.
    ! Warning: `dart` on your path resolves to /opt/homebrew/Cellar/dart/2.18.5/libexec/bin/dart, which is not inside your current Flutter SDK checkout at /fvm/versions/3.13.4. Consider adding /fvm/versions/3.13.4/bin to the front of your path.
[!] Android toolchain - develop for Android devices (Android SDK version 33.0.2)
    โœ— cmdline-tools component is missing
      Run `path/to/sdkmanager --install "cmdline-tools;latest"`
      See https://developer.android.com/studio/command-line for more details.
    โœ— Android license status unknown.
      Run `flutter doctor --android-licenses` to accept the SDK licenses.
      See https://flutter.dev/docs/get-started/install/macos#android-setup for more details.
[โœ“] Xcode - develop for iOS and macOS (Xcode 14.3.1)
[โœ“] Chrome - develop for the web
[โœ“] Android Studio (version 2022.1)
[โœ“] VS Code (version 1.82.1)
[โœ“] Connected device (4 available)
[โœ“] Network resources

! Doctor found issues in 2 categories.

Please advise.

No Podspec found.

image

Thank you so much for this wonderful package, please can you help in this. I'm facing this in ios.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.