NetworkMockScreen

fun NetworkMockScreen(resetToNetworkSharedFlow: SharedFlow<Unit>, navigateToEndpointScreen: (EndpointKey) -> Unit, viewModel: NetworkMockViewModel, modifier: Modifier = Modifier, bottomPadding: Dp = 0.dp)

Main screen for the Network Mock module.

Displays all configured API endpoints with controls to:

  • Toggle global mocking on/off

  • Enable/disable individual endpoint mocks

  • Select which mock response to return for each endpoint

  • Reset all mocks to use actual network

Parameters

resetToNetworkSharedFlow

Shared flow emitted by NetworkMock when the user triggers the "Reset to Network" toolbar action. Collected here to call NetworkMockViewModel.resetAllToNetwork.

navigateToEndpointScreen

Callback invoked when the user taps an EndpointCard, passing the corresponding EndpointKey so the caller can push NetworkMockDestination.Endpoint onto the backstack.

viewModel

The NetworkMockViewModel instance. Constructed and provided by NetworkMock.registerContent via the viewModel { } factory so that it is scoped to the navigation entry.

modifier

Optional modifier for the screen.

bottomPadding

Bottom inset padding provided by the DevView androidx.compose.material3.Scaffold. Applied to the endpoint list so the last item is not obscured by system navigation bars.