GleamNavigator

Navigator that drives a GleamState for use with GleamScaffolds within the navigation library. Every destination using this Navigator must set a valid Composable by defining it directly on an instantiated Destination or calling gleam.

Key behavior:

  • The gleamContent always displays the latest entry from the back stack.

  • Navigating between Gleam destinations replaces the current content instead of creating a new gleam.

  • Dismissing the Gleam via user interaction pops the latest entry from the state's back stack.

Public Usage:

Use rememberGleamNavigator to create and access a GleamNavigator instance in your composables. This function handles memory management and ensures consistent usage throughout your application.

Parameters

gleamState

The GleamState that the GleamNavigator will control.

Constructors

Link copied to clipboard
constructor(gleamState: GleamState)

Types

Properties

Link copied to clipboard

A Composable function that hosts the current gleam content. This should be set as gleamContent of your GleamScaffold.

Link copied to clipboard
Link copied to clipboard

Determines the overall visibility state of the Gleam content.

Link copied to clipboard
Link copied to clipboard

Determines whether the current navigation state should be visible based on the back stack.

Functions

Link copied to clipboard
Link copied to clipboard
open fun navigate(destination: GleamNavigator.Destination, args: Bundle?, navOptions: NavOptions?, navigatorExtras: Navigator.Extras?): NavDestination?
open override fun navigate(entries: List<NavBackStackEntry>, navOptions: NavOptions?, navigatorExtras: Navigator.Extras?)
Link copied to clipboard
open override fun onAttach(state: NavigatorState)
Link copied to clipboard
open fun onLaunchSingleTop(backStackEntry: NavBackStackEntry)
Link copied to clipboard
open fun onRestoreState(savedState: Bundle)
Link copied to clipboard
open fun onSaveState(): Bundle?
Link copied to clipboard
open fun popBackStack(): Boolean
open override fun popBackStack(popUpTo: NavBackStackEntry, savedState: Boolean)
Link copied to clipboard

Associates a NavHostController with this GleamNavigator, enabling navigation using Gleam composables.