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

commonMain.com.bselzer.ktx.compose.ui.layout.merge.IndicationMerger.kt Maven / Gradle / Ivy

There is a newer version: 7.0.0
Show newest version
package com.bselzer.ktx.compose.ui.layout.merge

import androidx.compose.foundation.Indication
import androidx.compose.foundation.IndicationInstance
import androidx.compose.foundation.interaction.InteractionSource
import androidx.compose.runtime.Composable
import androidx.compose.runtime.Stable
import androidx.compose.ui.graphics.drawscope.ContentDrawScope

class IndicationMerger : ComponentMerger {
    override val default: Indication = Default

    companion object {
        @Stable
        val Default = object : Indication {
            @Composable
            override fun rememberUpdatedInstance(interactionSource: InteractionSource) = Instance
        }

        @Stable
        private val Instance = object : IndicationInstance {
            override fun ContentDrawScope.drawIndication() = drawContent()
        }
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy