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

commonMain.com.bselzer.ktx.compose.ui.layout.project.Presenter.kt Maven / Gradle / Ivy

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

import androidx.compose.runtime.Composable
import com.bselzer.ktx.compose.ui.layout.modifier.presentable.PresentableModifier

@Suppress("UNCHECKED_CAST")
abstract class Presenter(
    override val modifier: PresentableModifier
) : Presentable where Model : Presenter {
    override fun merge(other: Model?): Model = if (other == null || other === this) this as Model else safeMerge(other)
    protected abstract fun safeMerge(other: Model): Model

    @Composable
    override fun localized(): Model = this as Model
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy