pullrefresh
Standalone pull to refresh library for Jetpack Compose multiplatform without the reliance on Material.

Use
Add to project
Gradle (Kotlin):
implementation("dev.materii.pullrefresh:pullrefresh:$pullRefreshVersion")
Gradle (Groovy):
implementation 'dev.materii.pullrefresh:pullrefresh:$pullRefreshVersion'
Gradle (Version Catalog):
materii-pullrefresh = { group = "dev.materii.pullrefresh", name = "pullrefresh", version.ref = "pullrefresh" }
Basic setup
Pull to refresh
See the sample.
| Default | Flipped |
|---|
 |  |
@Composable
fun Test() {
var isRefreshing by remember {
mutableStateOf(false)
}
var pullRefreshState = rememberPullRefreshState(refreshing = isRefreshing, onRefresh = { })
PullRefreshLayout(
modifier = modifier,
state = pullRefreshState
) {
Text("Some content")
}
}
Drag to refresh
See the sample.
| Default | Flipped |
|---|
 |  |
@Composable
fun Test() {
var isRefreshing by remember {
mutableStateOf(false)
}
var pullRefreshState = rememberPullRefreshState(refreshing = isRefreshing, onRefresh = { })
DragRefreshLayout(
modifier = modifier,
state = pullRefreshState
) {
Text("Some content")
}
}
Notice
All of the included components come directly from the official Jetpack Compose Material library, with only the bare minimum required.
Copyright 2022 The Android Open Source Project
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance the License.
You may obtain a copy of the License at
http:
Unless applicable law agreed to writing, software
distributed under the License distributed an BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express implied.
See the License the specific language governing permissions
limitations under the License.