entry

fun entry(screenId: String, initialTiles: TileSchemaBuilderScope.() -> Unit = {}, initialEvents: EventSchemaBuilderScope.() -> Unit = { GetScreen( trigger = EventTriggers.onDisplay(), events = { ChangeScreenState( trigger = EventTriggers.onSuccess(), state = successState() ) } ) }, failureTiles: TileSchemaBuilderScope.() -> Unit = {}, failureEvents: EventSchemaBuilderScope.() -> Unit = {}, transition: ContentTransitionSchema? = null, popTransition: ContentTransitionSchema? = null, predictivePopTransition: ContentTransitionSchema? = null)

Declares one screen reachable inside a dev.catbit.mosaic.server.builder.graph.Graph.

Parameters

screenId

Identifier of this entry, matched against the graph's startEntryId and against Navigate destinations.

initialTiles

Tiles shown while this entry's initial data is loading. Defaults to none.

initialEvents

Events run when this entry becomes displayed. Defaults to GetScreen on display, followed by ChangeScreenState to success on success.

failureTiles

Tiles shown if loading this entry fails. Defaults to none.

failureEvents

Events run when loading this entry fails (e.g. a retry action). Defaults to none.

transition

Enter/exit transition used when navigating to this entry. Defaults to none (falls back to the graph's defaultTransition).

popTransition

Transition used when navigating back from this entry. Defaults to none (falls back to the graph's defaultPopTransition).

predictivePopTransition

Transition used during the predictive back gesture on this entry. Defaults to none (falls back to the graph's defaultPredictivePopTransition).