This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
private const val DEFAULT_THROTTLE_TIMEOUT = 500L | |
@Composable | |
fun LazyListPagination( | |
state: LazyListState, | |
enable: Boolean, | |
onPaginate: () -> Unit, | |
offset: Int = 0, | |
throttleTimeout: Long = DEFAULT_THROTTLE_TIMEOUT, | |
) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import androidx.compose.foundation.background | |
import androidx.compose.foundation.layout.Box | |
import androidx.compose.foundation.layout.PaddingValues | |
import androidx.compose.foundation.layout.calculateEndPadding | |
import androidx.compose.foundation.layout.calculateStartPadding | |
import androidx.compose.foundation.layout.fillMaxSize | |
import androidx.compose.foundation.layout.padding | |
import androidx.compose.foundation.layout.size | |
import androidx.compose.runtime.Composable | |
import androidx.compose.ui.Modifier |