Chat Screen
fun ChatScreen(virtualAddress: InetAddress, userName: String? = null, isOffline: Boolean = false, onClickButton: () -> Unit, viewModel: ChatScreenViewModel = viewModel(
factory = ViewModelFactory(
di = localDI(),
owner = LocalSavedStateRegistryOwner.current,
vmFactory = { di, savedStateHandle ->
ChatScreenViewModel(di, savedStateHandle)
},
defaultArgs = Bundle().apply {
putSerializable("virtualAddress", virtualAddress)
}
)
))
Composable function representing the main chat screen.
Parameters
virtual Address
The IP address of the chat participant.
user Name
Optional username for the chat participant.
is Offline
Boolean flag indicating if the user is offline.
on Click Button
Callback for button click events.
view Model
The ChatScreenViewModel providing UI state and actions.