custom_image_picker

Creator: coderz1093

Last updated:

0 purchases

custom_image_picker Image
custom_image_picker Images

Languages

Categories

Add to Cart

Description:

custom image picker

custom_image_picker #
A flutter plugin that allows you to retrieve the device's images and albums in order to customize your image picker depending on your needs.
Getting Started #
Add dependency #
dependencies:
custom_image_picker: ^0.5.0
copied to clipboard
Usage #
Import the library #
import 'package:custom_image_picker/custom_image_picker.dart';
copied to clipboard
Get albums: #
List<PhoneAlbum> albums = [];
final customImagePicker = CustomImagePicker();
customImagePicker.getAllImages(callback: (retrievedAlbums) {
albums = retrievedAlbums;
});
copied to clipboard
Each album contains the following data
class PhoneAlbum {
final String id;
final String name;
final String coverUri;
final int photosCount;

PhoneAlbum(this.id, this.name, this.coverUri, this.photosCount);

...
}
copied to clipboard
Get photos of an album: #
List<PhonePhoto> imagesOfAlbum = [];
final customImagePicker = CustomImagePicker();
customImagePicker.getPhotosOfAlbum(
albumID, // The id of the album you want to retrieve the images for
page: page, // The page number defaults to '1', in each page the library returns 50 images of the album
callback: (images) {
imagesOfAlbum.addAll(images);
},
);
copied to clipboard
Each photo contains the following data
class PhoneAlbum {
final String id;
final String albumName;
final String photoUri;

PhonePhoto(this.id, this.albumName, this.photoUri);

...
}
copied to clipboard
Platforms: #
The library works for both Android & iOS, but it doesn't support pagination for iOS yet, we are working on delivering this feature ASAP.
Where we are going with this #
We are currently trying to make more functions available to the package, so please feel free to add any suggestions in the issues

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.