FirstView

class FirstView(context: Context, viewModel: FirstViewModel, shuttle: Shuttle)

The Composable view for the first screen in the MVVM with Process Death demo. Presents two navigation options: using com.grarcht.shuttle.framework.Shuttle to transport cargo safely, or passing the image directly via android.content.Intent to demonstrate the crash scenario.

Parameters

context

the context used to access resources and start activities.

viewModel

the view model that loads the image and exposes the UI state.

shuttle

the Shuttle instance used for safe cargo transport.

Constructors

Link copied to clipboard
constructor(context: Context, viewModel: FirstViewModel, shuttle: Shuttle)

Functions

Link copied to clipboard

Cleans up all cargo delivered by Shuttle from the warehouse. Call this when the view is no longer needed, such as in android.app.Activity.onDestroy.

Link copied to clipboard

Renders the first screen layout with navigation cards and a preview animation overlay.