MVISecondView

class MVISecondView(context: Context, viewModel: SecondViewModel)

The Composable view for the second screen in the MVI with Compose demo. It retrieves cargo from the Shuttle warehouse using a cargo ID passed from the first screen and displays the resulting image, a loading indicator, or an error state accordingly.

Parameters

context

the context used to access resources and string values.

viewModel

the view model that processes intents and exposes the UI state.

Constructors

Link copied to clipboard
constructor(context: Context, viewModel: SecondViewModel)

Functions

Link copied to clipboard
fun extractCargoId(savedInstanceState: Bundle?, arguments: Bundle?): String

Extracts the cargo ID from the savedInstanceState or arguments bundle by reading the com.grarcht.shuttle.framework.model.ShuttleParcelCargo parcelable stored at the image cargo key.

Link copied to clipboard