Giter Site home page Giter Site logo

ahmedabdoelhawary / image_picker_plus Goto Github PK

View Code? Open in Web Editor NEW
56.0 1.0 30.0 857 KB

This package is based on Custom-gallery-display (my package) to make it easy and fast.

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

License: MIT License

Dart 62.10% Swift 0.93% CMake 8.89% C++ 10.99% C 0.67% Kotlin 0.06% Objective-C 5.48% HTML 0.87% Shell 0.51% Java 9.15% Ruby 0.33%
camera-preview flutter-awesome flutter-gallery flutter-picker flutter-ui gallery image-picker instagram-gallery instagram-photos pick-image

image_picker_plus's Introduction

Image picker plus

When you try to add a package (like image_picker) to pick an image from a gallery/camera, you will face a lot of issues like:-

  • If your app supports multi-themes image picker will not respond with that.
  • If your app supports multi-languages image picker will not respond with that.
  • If your app has a beautiful design and a good user experience, image_picker will break all of this, Because image_picker has a traditional UI of Gallery display.

In (image_picker_plus), we solve all those issues and many other features like:-

  • You can customize the UI of displaying the gallery.
  • You can crop the selected image(s) with different aspect ratios.
  • You can display photos and videos and choose from both of them.
  • You can display a gallery, camera, and video, and the user can choose between them.

Pub Package License: MIT

Installing

IOS

* The camera plugin compiles for any version of iOS, but its functionality requires iOS 10 or higher. If compiling for iOS 9, make sure to programmatically check the version of iOS running on the device before using any camera plugin features. The device_info_plus plugin, for example, can be used to check the iOS version.

Add two rows to the ios/Runner/Info.plist:

  • one with the key Privacy - Photo Usage Description and a usage description.
  • and one with the key Privacy - Camera Usage Description and a usage description.
  • and one with the key Privacy - Microphone Usage Description and a usage description.

If editing Info.plist as text, add:

<key>NSPhotoLibraryUsageDescription</key>
<string>your usage description here</string>
<key>NSCameraUsageDescription</key>
<string>your usage description here</string>
<key>NSMicrophoneUsageDescription</key>
<string>your usage description here</string>

Android

  • Change the minimum Android sdk version to 21 (or higher), and compile sdk to 31 (or higher) in your android/app/build.gradle file.
compileSdkVersion 33
        minSdkVersion 21
  • Add this permission into your AndroidManifest.xml
<manifest>
    ...
    <application
        android:requestLegacyExternalStorage="true"
    ...
</application>
<uses-permission android:name="android.permission.INTERNET"/>

<uses-permission android:name="android.permission.READ_MEDIA_IMAGES" />
<uses-permission android:name="android.permission.READ_MEDIA_VIDEO" />
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE>" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>
    </manifest>

1. Depend on it

Add this to your package's pubspec.yaml file:

dependencies:
  image_picker_plus: [last_version]

2. Install it

You can install packages from the command line:

with pub:

$ pub get image_picker_plus

with Flutter:

$ flutter pub add image_picker_plus

3. Import it

In your Dart code, you can use:

import 'package:image_picker_plus/image_picker_plus.dart';

image_picker_plus's People

Contributors

ahmedabdoelhawary 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

Watchers

 avatar

image_picker_plus's Issues

Error: The class 'Drag' can't be used as a mixin because it isn't a mixin class nor a mixin.

Hi! I tried to reproduce example normal1 from pub.dev and got error

Failed to build iOS app Error (Xcode): ../../../.pub-cache/hosted/pub.dev/image_crop-0.4.1/lib/src/crop.dart:63:68: Error: The class 'Drag' can't be used as a mixin because it isn't a mixin class nor a mixin. crop.dart:63 Could not build the application for the simulator. Error launching application on iPhone 14 Pro. Exited

Environment
Flutter version 3.10.0 on channel stable Dart version 3.0.0 DevTools version 2.23.1

Theme customization

First of all thanks for this, a PR that would allow customization of arrow icon colors and selected images would be great if
you allow I can do that and open a PR for you.

App Crashes when Camera Opens in MI Note 7s

I am Encountering an issue with Flutter upload image functionality. when I attempt to upload using Mi brand phones, the camera abruptly shuts down and the application restarts. Currently, I am using the Redmi Note 7S, and this problem seems to be specific to Mi phones. On other brands of phones the upload feature works fine. Unfortunately, there are no specific error messages displayed. It showing loss of device connection in logs. It could possibly be an issue with the Flutter plugin. I am using "image_picker_plus: ^0.5.6+2".

0.5.8 import error

Failed to notify project evaluation listener.
Could not get unknown property 'android' for project ':image_picker_plus' of type org.gradle.api.Project.
Could not find method implementation() for arguments [project ':photo_manager'] on object of type org.gradle.api.internal.artifacts.dsl.dependencies.DefaultDependencyHandler.
Could not get unknown property 'android' for project ':image_picker_plus' of type org.gradle.api.Project.

An option to customise blue Done button

The color of the blue arrow to confirm selection is hardcoded. It would be great to have an opportunity to change this color (or even change it to another icon)

Version error

Because image >=3.2.1 depends on xml ^6.0.1 and image >=3.2.0 <3.2.1 depends on xml ^6.0.0, image >=3.2.0 requires xml ^6.0.0. And because every version of image_picker_plus depends on image ^3.2.0, every version of image_picker_plus requires xml ^6.0.0. And because excel 2.0.0-null-safety-3 depends on xml ^5.0.2 and no versions of excel match >2.0.0-null-safety-3 <3.0.0, image_picker_plus is incompatible with excel ^2.0.0-null-safety-3. So, because myfeats depends on both excel ^2.0.0-null-safety-3 and image_picker_plus ^0.5.5+1, version solving failed. pub get failed (1; So, because myfeats depends on both excel ^2.0.0-null-safety-3 and image_picker_plus ^0.5.5+1, version solving failed.) exit code 1

I am getting this error after adding the package

AGPL-3.0 license

From my research the License attached to this package: AGPL-3.0 forces any project you use this package in to also be open-source. Meaning that if you use this in a businesses closed source Flutter app, you open yourself up to lawsuits.

My question to the creator is why they are using this "toxic" license and if it can be changed? Because, if it can not be changed, I and others will be forced to remove and replace it from their projects.

Thanks!

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.