Skip to content

Latest commit

 

History

History
49 lines (41 loc) · 1.26 KB

File metadata and controls

49 lines (41 loc) · 1.26 KB

DragDownSlider

A CRED like DragDownSlider library for Android Jetpack Compose.

Sample App

A Sample App built with MVVM along with tests can be found at Sample App

Installation

Step 1. Add the JitPack repository to your build file Add it in your root build.gradle at the end of repositories:

allprojects {
	repositories {
		...
		maven { url 'https://jitpack.io' }
	}
}

Step 2. Add the dependency

dependencies {
	 implementation 'com.github.madhurgupta10:DragDownSlider:1.0.1'
}

Usage

val sliderState = rememberSwipeableState(SliderState.Start)
val isDragEnabled by remember { mutableStateOf(true) }
val responseState by remember { mutableStateOf(OnSlideCompleteState.Loading) }

DragDownSlider(
    compactCardSize = 400.dp,
    sliderState = sliderState,
    onSlideCompleteState = responseState,
    isDragEnabled = isDragEnabled,
    onSlideComplete = {
        ...
    }
)