All Downloads are FREE. Search and download functionalities are using the official Maven repository.

jvmMain.tech.skot.core.components.SKPagerViewMock.kt Maven / Gradle / Ivy

There is a newer version: 1.2.9
Show newest version
package tech.skot.core.components

class SKPagerViewMock(
    screens: List,
    onSwipeToPage: ((index: Int) -> Unit)?,
    initialSelectedPageIndex: Int,
    swipable: Boolean
): SKComponentViewMock(), SKPagerVC {
    override var screens: List = screens
    override var selectedPageIndex: Int = initialSelectedPageIndex
    override val onSwipeToPage = onSwipeToPage
    override val swipable: Boolean = swipable

    fun userSwipeToPage(index:Int) {
        onSwipeToPage?.invoke(index)
    }
}

fun SKPagerVC.userSwipeToPage(index:Int) {
    (this as SKPagerViewMock).userSwipeToPage(index)
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy