NavigationNode

inline fun <N : FonamentNavigationEvent, U : FonamentUIState, C : FonamentContentState> FonamentContent<U, C>.NavigationNode(uiState: U, contentState: C, navigationEventHandler: FonamentNavigationEventHandler<N> = FonamentNavigationEventHandler { })

Wrapper of FonamentContent.invoke that receives a FonamentNavigationEventHandler and the uiState and contentState. You can use this function to create a navigation entry node in your navigation graph.

Parameters

N

The type of navigation event to handle, must implement FonamentNavigationEvent.

U

The type of UI state, must implement FonamentUIState.

C

The type of content state, must implement FonamentContentState.

navigationEventHandler

The handler for navigation events of type N. Defaults to a no-op handler.

uiState

The UI state of type U.

contentState

The content state of type C.


inline fun <N : FonamentNavigationEvent> FonamentStatelessContent.NavigationNode(navigationEventHandler: FonamentNavigationEventHandler<N> = FonamentNavigationEventHandler { })

Wrapper of FonamentStatelessContent.invoke that receives a FonamentNavigationEventHandler. You can use this function to create a navigation entry node in your navigation graph.

Parameters

N

The type of navigation event to handle, must implement FonamentNavigationEvent.

navigationEventHandler

The handler for navigation events of type N. Defaults to a no-op handler.


inline fun <N : FonamentNavigationEvent, U : FonamentUIState> FonamentUI<U>.NavigationNode(navigationEventHandler: FonamentNavigationEventHandler<N> = FonamentNavigationEventHandler { }, viewModel: FonamentViewModel<U>)

Wrapper of FonamentUI.invoke that receives a FonamentNavigationEventHandler and a viewModel. You can use this function to create a navigation entry node in your navigation graph.

Parameters

N

The type of navigation event to handle, must implement FonamentNavigationEvent.

U

The type of UI state, must implement FonamentUIState.

navigationEventHandler

The handler for navigation events of type N. Defaults to a no-op handler.

viewModel

The FonamentViewModel providing the UI state of type U.