Skip to content
/ voyager Public
forked from dzmpr/voyager

🛸 A pragmatic navigation library for Jetpack Compose

License

Notifications You must be signed in to change notification settings

Vodes/voyager

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Maven metadata URL Android API kotlin ktlint License MIT


Voyager: Compose on Warp Speed

A multiplatform navigation library built for, and seamlessly integrated with, Jetpack Compose.


Fork

This fork serves to provide a newer version based on newer Compose/Kotlin versions.
A couple of android-specific modules (Screenmodel-Hilt, LiveData, Kodein) have been removed due to trouble with building and because I don't see a place for them in a kmp project.

There may be a couple of bug fixes, most probably lifted out of existing PRs on the main repo.

  • Partially implements this PR by dzmpr to have a much saner project structure.
  • Downgraded back down to Kotlin 2.0.21 mostly because that's what I currently need.
  • Replaced the voyager internal ThreadSafe* classes with stately implementations.
    Because K/N still seems to randomly hallucinate issues when implementing an abstract class via expect.

How to use this fork

I don't intend on changing the user facing API in any way if at all possible so the regular docs apply.

Note that this does not mean that this fork is stable and will be safe to use at all times.
Use at your own risk.

I can't be arsed to setup sonatype so the builds can be found on my own repo.

repositories {
    /* ... */
    maven("https://repo.styx.moe/releases")
    maven("https://repo.styx.moe/snapshots") // There are currently no tags so auto-build snapshots are the only thing
}

// Common-Main if applicable
dependencies {
    /* ... */
    implementation("moe.styx.forks.voyager:<module>:<version>")
  
    /* e. g. */
    implementation("moe.styx.forks.voyager:voyager-navigator:1100cae1")
    implementation("moe.styx.forks.voyager:voyager-transitions:1100cae1")
    implementation("moe.styx.forks.voyager:voyager-screenmodel:1100cae1")
    implementation("moe.styx.forks.voyager:voyager-tab-navigator:1100cae1")
    implementation("moe.styx.forks.voyager:voyager-bottom-sheet-navigator:1100cae1")
}

Create scalable Single-Activity apps powered by a pragmatic API:

class HomeScreenModel : ScreenModel {
    // ...
}

class HomeScreen : Screen {

    @Composable
    override fun Content() {
        val screenModel = rememberScreenModel<HomeScreenModel>()
        // ...
    }
}

class SingleActivity : ComponentActivity() {

    override fun onCreate(savedInstanceState: Bundle?) {
        super.onCreate(savedInstanceState)

        setContent {
            Navigator(HomeScreen())
        }
    }
}

Turn on the Warp Drive and enjoy the voyage 🖖

Documentation

See the project website for documentation and APIs.

Features

Samples

Stack API Android ViewModel ScreenModel Basic nav.
navigation-stack navigation-android-viewmodel navigation-screenmodel navigation-basic
BottomSheet nav. Tab nav. Multi-module nav. Nested nav.
navigation-bottom-sheet navigation-tab navigation-multi-module navigation-nested

About

🛸 A pragmatic navigation library for Jetpack Compose

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Kotlin 100.0%