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

commonMain.com.arkivanov.decompose.router.pages.PagesNavigation.kt Maven / Gradle / Ivy

There is a newer version: 3.2.0-beta01
Show newest version
package com.arkivanov.decompose.router.pages

import com.arkivanov.decompose.router.children.NavigationSource
import com.arkivanov.decompose.router.pages.PagesNavigation.Event

/**
 * Represents [PagesNavigator] and [PagesNavigationSource] at the same time.
 */
interface PagesNavigation : PagesNavigator, NavigationSource> {

    class Event(
        val transformer: (Pages) -> Pages,
        val onComplete: (newPages: Pages, oldPages: Pages) -> Unit = { _, _ -> },
    )
}

/**
 * Returns a default implementation of [PagesNavigation].
 * Broadcasts navigation events to all subscribed observers.
 */
fun  PagesNavigation(): PagesNavigation =
    DefaultPagesNavigation()




© 2015 - 2024 Weber Informatics LLC | Privacy Policy