image_crafter

Last updated:

0 purchases

image_crafter Image
image_crafter Images
Add to Cart

Description:

image crafter

image_crafter #


Introduction #
A Dart package that provides utility functions for selecting, cropping, and processing images,
along with an example usage in a Flutter app.
Supported platforms #

Android
iOS

Features #

Select images from the gallery or capture from the camera.
Crop selected images to desired aspect ratios.
Process and compress images while maintaining quality.

Example #
Check out the example
Configuration #
iOS #
Starting with version 0.8.1 the iOS implementation uses PHPicker to pick
(multiple) images on iOS 14 or higher.
As a result of implementing PHPicker it becomes impossible to pick HEIC images
on the iOS simulator in iOS 14+. This is a known issue. Please test this on a
real device, or test with non-HEIC images until Apple solves this issue.
63426347 - Apple known issue
Add the following keys to your Info.plist file, located in
<project root>/ios/Runner/Info.plist:

NSPhotoLibraryUsageDescription - describe why your app needs permission for
the photo library. This is called Privacy - Photo Library Usage Description in
the visual editor.

This permission will not be requested if you always pass false for
requestFullMetadata, but App Store policy requires including the plist
entry.


NSCameraUsageDescription - describe why your app needs access to the camera.
This is called Privacy - Camera Usage Description in the visual editor.

Android #

Add UCropActivity into your AndroidManifest.xml


<activity
android:name="com.yalantis.ucrop.UCropActivity"
android:screenOrientation="portrait"
android:theme="@style/Theme.AppCompat.Light.NoActionBar"/>

copied to clipboard
Add permissions for Android #
In the android/app/src/main/AndroidManifest.xml add:

<uses-permission android:name="android.permission.INTERNET"/>
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.CAMERA" />
<uses-feature android:name="android.hardware.camera" android:required="true" />

copied to clipboard

Make sure you set the compileSdkVersion in your "android/app/build.gradle" file to 33:

* android {
compileSdkVersion 33
...
}
copied to clipboard
Usage #
You can check permission status #
var permissionStatus = await ImageUtility.checkPermission();
if(permissionStatus ){
//
}else{
//Navigate to setting
}
copied to clipboard

File? image = await ImageUtility.imageFromGallery(imageQuality: 60);

File? image= await ImageUtility.imageFromCamera(imageQuality: 60 );

copied to clipboard
Contributor #

Aniket kanade (ZingWorks LLP)

License:

For personal and professional use. You cannot resell or redistribute these repositories in their original state.

Files In This Product:

Customer Reviews

There are no reviews.