ScannerScreen
fun ScannerScreen(cancellable: Boolean, onResultSelected: (ScannerScreenResult) -> Unit, modifier: Modifier = Modifier, state: ScanFilterState = rememberFilterState(), timeout: Duration = Duration.INFINITE, title: @Composable () -> Unit = { Text(stringResource(id = R.string.scanner_screen)) }, verticalArrangement: Arrangement.Vertical = Arrangement.spacedBy(8.dp), deviceItem: @Composable (ScanResult) -> Unit = { scanResult ->
DeviceListItem(scanResult)
})
A scanner screen with an AppBar and a list of devices.
Parameters
cancellable
If true, the screen will have a navigation button to cancel scanning.
onResultSelected
Callback invoked when a device is selected or scanning is cancelled.
modifier
Modifier to be applied to the screen.
state
The state of the scan filter. Use this to set a static filter and dynamic filters.
title
Composable function to display the title of the App Bar.
timeout
The duration after which the scan will stop. Defaults to Duration.INFINITE.
verticalArrangement
The vertical arrangement of the devices in the list.
deviceItem
Composable function to display each device in the list.