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

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

The newest version!
package tech.skot.core.components

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

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

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




© 2015 - 2024 Weber Informatics LLC | Privacy Policy