• Stars
    star
    293
  • Rank 141,748 (Top 3 %)
  • Language
    Kotlin
  • License
    Apache License 2.0
  • Created almost 3 years ago
  • Updated over 1 year ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Pluck, a library that helps you to pick image via Gallery/Camera built using Compose

Pluck - The image-picker library for Compose

Pluck

This is an image-picker for your jetpack compose project. You can select from Gallery/Camera. This uses Material you and will be getting support for it in future as well.

Made with ❀️ for Android Developers by Himanshu

Maven Central Github Followers Twitter Follow

Implementation

Step: 01

Add the specific permission in AndroidManifest.xml file

<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />

<uses-permission android:name="android.permission.CAMERA" />

Step: 02

In build.gradle of app module, include the following dependency

dependencies {
  implementation("com.himanshoe:pluck:1.0.0-RC2")
}

Usage

01

Now, to start using Pluck, use the composable Pluck like,

Pluck(onPhotoSelected = {
    // List of PluckImage when selecting from Gallery/Camera. When checking with Camera
    // It returns only one item in list
})

02

Now, if you want Pluck to handle the Permission for you as well. Use it like,

Permission(
    permissions = listOf(
        Manifest.permission.CAMERA,
        Manifest.permission.READ_EXTERNAL_STORAGE
    ),
    goToAppSettings = {
        // Go to App Settings
    }
) {
    Pluck(onPhotoSelected = {
        // List of PluckImage when selecting from Gallery/Camera. When checking with Camera
        // It returns only one item in list
    })
}

03

If you want to configure do you want to select single image or multiple image from gallery you need to edit the PluckConfiguration like,

    Pluck(
        pluckConfiguration = PluckConfiguration(multipleImagesAllowed = true),
        onPhotoSelected = { }
    )

Drop a ⭐ to keep me motivated to keep working on Open-Source. Updates coming Soon!

More Repositories

1

Charty

An Elementary Chart library for Jetpack Compose. You can implement any kind of chart natively designed for Compose.
Kotlin
716
star
2

Kalendar

Kalendar is a powerful and customizable calendar library for Android applications. It provides a flexible and intuitive way to display and interact with calendars in your app. With Kalendar, you can easily render calendar views, handle date selection, pagination, and range selection, and customize the layout to match your app's design.
Kotlin
636
star
3

CovidVaccine

This app can be used to track open slots for vaccination. This is built using Jetpack Compose.
Kotlin
100
star
4

Flutter-Apps-Collection

This is a repository of a collection of apps made in flutter
Dart
96
star
5

ComposePictures

This is a project built using Jetpack Compose on UI, Clean architecture, Dagger Hilt, Kotlin Flow, Navigation Components etc.
Kotlin
88
star
6

ktor-mongodb-backend

It is a repository containing backend structure for Ktor.
Kotlin
58
star
7

Flutter-Music-App

The music app developed based on a dribble design.
Makefile
46
star
8

modular-app-architecture

This is a sample project for Dynamic Feature Module implementation
Kotlin
31
star
9

in-app-purchase-demo

this is to the blog I have written on In App Purchase
Kotlin
30
star
10

ktor-url-shortener

This is a Ktor project to build your own Url shortener
Kotlin
25
star
11

Flutter-Login-Screen

Login Screen UI made in flutter
Dart
6
star
12

Flutter-Drawer

Dart
5
star
13

Flutter-Chat-UI

Dart
4
star
14

Flutter-Crypto-App

The flutter project made to display all the price of top 50 cryptoCurrency from Coin Market API
Dart
4
star
15

navigation-spike

Navigation Spike test for multi module compose project
Kotlin
3
star
16

Flutter-API-Request

Dart
3
star
17

FlutterSwipeToDismiss

Swipe to dismiss feature in Flutter List
Dart
3
star
18

covid-cure

Kotlin
3
star
19

Flutter-Crypto

This is a repository of app made in flutter using dependency injection and MVP.
Makefile
2
star
20

CookFood

Kotlin
2
star
21

slide-fomo

CSS
2
star
22

Flutter-Clipping

Clipping of Images using Flutter
Dart
2
star
23

Flutter-Calculator

Calculator app made using Flutter
Dart
1
star
24

hi-manshu

1
star
25

Flutter-SnackBar

Dart
1
star
26

PIG-Game-JavaScript

A ludo game to decide winner :)
JavaScript
1
star
27

blog-himanshoe

CSS
1
star