Package-level declarations

Types

Link copied to clipboard

CO₂ severity levels based on concentration thresholds (ppm).

Link copied to clipboard
Link copied to clipboard
data class DropDownItem<T>(val value: T, val label: String, val icon: ImageVector? = null, val color: Color? = null, val enabled: Boolean = true)
Link copied to clipboard
enum Iaq : Enum<Iaq>
Link copied to clipboard
Link copied to clipboard
data class MenuFABItem(val label: String, val icon: ImageVector, val onClick: () -> Unit, val testTag: String? = null)
Link copied to clipboard

Represents the various visual states of the node key as an enum. Each enum constant encapsulates the icon, color, descriptive text, and optional badge details.

Link copied to clipboard

EPA AQI severity categories for PM2.5-derived AQI (0-500), per meshtastic/design#54. Mirrors Co2Severity's ppm→severity pattern, keyed on AQI value instead.

Link copied to clipboard
Link copied to clipboard

Event emitted when a user re-presses a bottom navigation destination that should trigger a scroll-to-top behaviour on the corresponding screen.

Link copied to clipboard

Represents the various visual states of the security icon as an enum. Each enum constant encapsulates the icon, color, descriptive text, and optional badge details.

Properties

Link copied to clipboard
Link copied to clipboard

Extension property to check if the channel uses a low entropy PSK (not securely encrypted).

Link copied to clipboard

Extension property to check if MQTT is enabled for the channel.

Link copied to clipboard

Extension property to check if the channel has precise location enabled.

Link copied to clipboard
const val MAX_VALID_RSSI: Int = 0
Link copied to clipboard
const val MAX_VALID_SNR: Float = 100.0f
Link copied to clipboard
const val NODE_TINT_EMPHASIZED: Float = 0.16f
Link copied to clipboard
const val NODE_TINT_MUTED: Float = 0.04f
Link copied to clipboard
const val NODE_TINT_NORMAL: Float = 0.08f

Shared node-tinted surface treatment so node cards and message bubbles match. A node's identity color is applied as a faint wash over the neutral card surface plus a node-colored outline — the more accessible alternative to a heavily saturated fill, since content keeps the surface/onSurface AA pairing while still reading as "this node".

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard

Dark backing for status-colored content. The status tokens (StatusGreen/Yellow/Orange/Red) are bright indicator colors that only stay legible against a dark surface, so this scrim keeps them readable on any surface (message bubbles, node cards) while letting them keep their true values.

Functions

Link copied to clipboard
fun AdaptiveTwoPane(first: @Composable ColumnScope.() -> Unit, second: @Composable ColumnScope.() -> Unit, modifier: Modifier = Modifier)

A two-slot adaptive layout: first and second are stacked in a single column on compact/medium windows and shown side-by-side once the window is large enough to warrant a second pane.

Link copied to clipboard
fun AdaptiveTwoPaneSample(modifier: Modifier = Modifier)

Screenshot-test sample; public so :screenshot-tests can render it at compact, medium, and expanded widths.

Link copied to clipboard
fun AirQualityInfo(iaq: String, modifier: Modifier = Modifier, contentColor: Color = MaterialTheme.colorScheme.onSurface)
Link copied to clipboard
fun AlertHost(alertManager: AlertManager)

Shared composable that observes AlertManager.currentAlert and renders a MeshtasticDialog when an alert is present. This eliminates duplicated alert-rendering boilerplate across Android and Desktop host shells.

Link copied to clipboard
fun AnimatedConnectionsNavIcon(connectionState: ConnectionState, deviceType: DeviceType?, meshActivityFlow: Flow<MeshActivity>, modifier: Modifier = Modifier)

A wrapper around ConnectionsNavIcon that adds a blinking glow effect when there is mesh activity (Send/Receive).

Link copied to clipboard
fun AutoLinkText(text: String, modifier: Modifier = Modifier, style: TextStyle = TextStyle.Default, linkStyles: TextLinkStyles = DefaultTextLinkStyles, color: Color = Color.Unspecified, textAlign: TextAlign? = null, mentionName: (String) -> String?? = null, onMentionClick: (String) -> Unit? = null)

A Text component that automatically detects and linkifies URLs, email addresses, and phone numbers.

Link copied to clipboard
fun BasicListItem(text: String, modifier: Modifier = Modifier, textColor: Color = Color.Unspecified, supportingText: String? = null, supportingTextColor: Color = Color.Unspecified, enabled: Boolean = true, leadingIcon: ImageVector? = null, leadingIconTint: Color = Color.Unspecified, trailingContent: @Composable () -> Unit? = null, onClick: () -> Unit? = null, onLongClick: () -> Unit? = null)

The foundational list item. It supports a leadingIcon (optional), headline text and supportingText (optional), and a trailingContent composable (optional).

Link copied to clipboard
fun BitwisePreference(title: String, value: Int, enabled: Boolean, items: List<Pair<Int, String>>, onItemSelected: (Int) -> Unit, modifier: Modifier = Modifier, summary: String? = null)
Link copied to clipboard
@Preview(showBackground = true)
fun BitwisePreferencePreview()
Link copied to clipboard
fun ChannelInfo(channel: Int, modifier: Modifier = Modifier, contentColor: Color = MaterialTheme.colorScheme.onSurface)
Link copied to clipboard
Link copied to clipboard
fun ChannelItem(index: Int, title: String, enabled: Boolean, onClick: () -> Unit = {}, content: @Composable RowScope.() -> Unit)
Link copied to clipboard
Link copied to clipboard
fun ChannelSelection(index: Int, title: String, enabled: Boolean, isSelected: Boolean, onSelected: (Boolean) -> Unit, channel: Channel)
Link copied to clipboard
fun ConnectionsNavIcon(modifier: Modifier = Modifier, connectionState: ConnectionState, deviceType: DeviceType?, contentDescription: String? = null)
Link copied to clipboard
fun CopyIconButton(valueToCopy: String, modifier: Modifier = Modifier, label: String = stringResource(Res.string.copy))
Link copied to clipboard
fun determineSignalQuality(snr: Float, modemPreset: Config.LoRaConfig.ModemPreset?): Quality

Rates link quality from SNR relative to the active modem preset's demodulation floor (ModemPreset.snrLimit). A given SNR means different things per preset — e.g. -15 dB is excellent on LongSlow (SF12) but unusable on ShortFast (SF7) — so a fixed threshold mis-rates most presets.

Link copied to clipboard
fun DistanceInfo(distance: String, modifier: Modifier = Modifier, contentColor: Color = MaterialTheme.colorScheme.onSurface)
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
inline fun <T> LazyListScope.dragDropItemsIndexed(items: List<T>, dragDropState: DragDropState, noinline key: (index: Int, item: T) -> Any? = null, crossinline itemContent: @Composable LazyItemScope.(index: Int, item: T, isDragging: Boolean) -> Unit)

Extension function for LazyListScope with drag-and-drop functionality for indexed items.

Link copied to clipboard
fun LazyItemScope.DraggableItem(dragDropState: DragDropState, index: Int, modifier: Modifier = Modifier, content: @Composable ColumnScope.(isDragging: Boolean) -> Unit)
Link copied to clipboard
@JvmName(name = "DropDownPreferencePairs")
fun <T> DropDownPreference(title: String, enabled: Boolean, items: List<Pair<T, String>>, selectedItem: T, onItemSelected: (T) -> Unit, modifier: Modifier = Modifier, summary: String? = null)
fun <T> DropDownPreference(title: String, enabled: Boolean, items: List<DropDownItem<T>>, selectedItem: T, onItemSelected: (T) -> Unit, modifier: Modifier = Modifier, summary: String? = null)
fun <T : Enum<T>> DropDownPreference(title: String, enabled: Boolean, selectedItem: T, onItemSelected: (T) -> Unit, modifier: Modifier = Modifier, summary: String? = null, itemIcon: @Composable (T) -> ImageVector? = null, itemColor: @Composable (T) -> Color? = null, itemLabel: @Composable (T) -> String? = null)
Link copied to clipboard
@Preview(showBackground = true)
fun DropDownPreferencePreview()
Link copied to clipboard
fun EditBase64Preference(modifier: Modifier = Modifier, title: String, summary: String? = null, value: ByteString, enabled: Boolean, readOnly: Boolean = false, keyboardActions: KeyboardActions, onValueChange: (ByteString) -> Unit, onGenerateKey: () -> Unit? = null, trailingIcon: @Composable () -> Unit? = null)
Link copied to clipboard
fun EditIPv4Preference(title: String, value: Int, enabled: Boolean, keyboardActions: KeyboardActions, onValueChanged: (Int) -> Unit, modifier: Modifier = Modifier)
Link copied to clipboard
@Preview(showBackground = true)
fun EditIPv4PreferencePreview()
Link copied to clipboard
inline fun <T> EditListPreference(title: String, list: List<T>, maxCount: Int, enabled: Boolean, keyboardActions: KeyboardActions, crossinline onValuesChanged: (List<T>) -> Unit, modifier: Modifier = Modifier, summary: String? = null)
Link copied to clipboard
@Preview(showBackground = true)
fun EditListPreferencePreview()
Link copied to clipboard
fun EditPasswordPreference(title: String, value: String, maxSize: Int, enabled: Boolean, keyboardActions: KeyboardActions, onValueChanged: (String) -> Unit, modifier: Modifier = Modifier)
Link copied to clipboard
@Preview(showBackground = true)
fun EditPasswordPreferencePreview()
Link copied to clipboard
fun EditTextPreference(title: String, value: Double, enabled: Boolean, keyboardActions: KeyboardActions, onValueChanged: (Double) -> Unit, modifier: Modifier = Modifier, summary: String? = null, onFocusChanged: (FocusState) -> Unit = {})
fun EditTextPreference(title: String, value: Float, enabled: Boolean, keyboardActions: KeyboardActions, onValueChanged: (Float) -> Unit, modifier: Modifier = Modifier, summary: String? = null, onFocusChanged: (FocusState) -> Unit = {})
fun EditTextPreference(title: String, value: Int, enabled: Boolean, isError: Boolean = false, keyboardActions: KeyboardActions, onValueChanged: (Int) -> Unit, modifier: Modifier = Modifier, summary: String? = null, onFocusChanged: (FocusState) -> Unit = {}, trailingIcon: @Composable () -> Unit? = null)
fun EditTextPreference(title: String, value: String, enabled: Boolean, isError: Boolean, keyboardOptions: KeyboardOptions, keyboardActions: KeyboardActions, onValueChanged: (String) -> Unit, modifier: Modifier = Modifier, summary: String? = null, maxSize: Int = 0, onFocusChanged: (FocusState) -> Unit = {}, trailingIcon: @Composable () -> Unit? = null, visualTransformation: VisualTransformation = VisualTransformation.None, multiline: Boolean = false)
Link copied to clipboard
@Preview(showBackground = true)
fun EditTextPreferencePreview()
Link copied to clipboard
fun ElevationInfo(modifier: Modifier = Modifier, altitude: Int, system: Config.DisplayConfig.DisplayUnits, suffix: String = stringResource(Res.string.elevation_suffix), contentColor: Color = MaterialTheme.colorScheme.onSurface)
Link copied to clipboard
fun EmptyDetailPlaceholder(icon: ImageVector, title: String, modifier: Modifier = Modifier)

Generic empty-state placeholder for detail panes in list-detail layouts.

Link copied to clipboard
fun EventInfoSheet(edition: EventFirmwareEdition, onDismiss: () -> Unit)

Bottom sheet shown when the user taps the event branding in MainAppBar. Surfaces the event metadata the bundled event_firmware.json carries — welcome message, location, dates, and links — themed with the edition's accent color.

Link copied to clipboard

Common component to check the connected device's firmware version against the minimum required version. Will display a dismissable alert if the firmware is old, or a blocking alert if it is too old.

Link copied to clipboard
fun getIaq(iaq: Int): Iaq?
Link copied to clipboard
fun getIconPair(connectionState: ConnectionState, deviceType: DeviceType? = null): Pair<ImageVector, ImageVector?>
Link copied to clipboard
fun HardwareInfo(hwModel: String, modifier: Modifier = Modifier, deviceImageUrl: String? = null, contentColor: Color = MaterialTheme.colorScheme.onSurface)
Link copied to clipboard
fun HighlightedText(text: String, query: String, modifier: Modifier = Modifier, style: TextStyle = TextStyle.Default, color: Color = Color.Unspecified)

A Text component that highlights occurrences of query within text using the tertiary container color. Each matching token in the query is highlighted independently (case-insensitive).

Link copied to clipboard
fun HopsInfo(hops: Int, modifier: Modifier = Modifier, contentColor: Color = MaterialTheme.colorScheme.onSurface)
Link copied to clipboard
Link copied to clipboard
fun HumidityInfo(humidity: String, modifier: Modifier = Modifier, contentColor: Color = MaterialTheme.colorScheme.onSurface)
Link copied to clipboard
fun IAQScale(modifier: Modifier = Modifier)
Link copied to clipboard
@Preview(showBackground = true)
fun IAQScalePreview()
Link copied to clipboard
fun ImageVector?.icon(tint: Color = Color.Unspecified): @Composable () -> Unit?
Link copied to clipboard
fun IconInfo(icon: ImageVector, contentDescription: String, modifier: Modifier = Modifier, label: String? = null, text: String? = null, style: TextStyle = MaterialTheme.typography.labelMedium, contentColor: Color = MaterialTheme.colorScheme.onSurface, content: @Composable () -> Unit = {})
Link copied to clipboard
Link copied to clipboard
fun IndoorAirQuality(iaq: Int?, displayMode: IaqDisplayMode = IaqDisplayMode.Pill)
Link copied to clipboard
fun InsetDivider(modifier: Modifier = Modifier, inset: Dp = 16.dp, thickness: Dp = DividerDefaults.Thickness, color: Color = DividerDefaults.color)
fun InsetDivider(modifier: Modifier = Modifier, startInset: Dp = 0.dp, endInset: Dp = 0.dp, thickness: Dp = DividerDefaults.Thickness, color: Color = DividerDefaults.color)
Link copied to clipboard
fun LastHeardInfo(modifier: Modifier = Modifier, lastHeard: Int, showLabel: Boolean = true, relative: Boolean = true, contentColor: Color = MaterialTheme.colorScheme.onSurface)
Link copied to clipboard
Link copied to clipboard
fun ListItem(text: String, modifier: Modifier = Modifier, supportingText: String? = null, textColor: Color = Color.Unspecified, supportingTextColor: Color = Color.Unspecified, copyable: Boolean = false, enabled: Boolean = true, leadingIcon: ImageVector? = null, leadingIconTint: Color = Color.Unspecified, trailingIcon: ImageVector? = MeshtasticIcons.ChevronRight, trailingIconTint: Color = Color.Unspecified, onClick: () -> Unit? = null)

A list item with an optional leadingIcon, headline text, optional supportingText, and optional trailingIcon.

Link copied to clipboard
@Preview(showBackground = true)
fun ListItemDisabledPreview()
Link copied to clipboard
@Preview(showBackground = true)
fun ListItemPreview()
Link copied to clipboard
fun LoraSignalIndicator(snr: Float, modifier: Modifier = Modifier, modemPreset: Config.LoRaConfig.ModemPreset? = LocalModemPreset.current, contentColor: Color = MaterialTheme.colorScheme.onSurface)

Displays a human readable description and icon representing the signal quality.

Link copied to clipboard
fun MainAppBar(modifier: Modifier = Modifier, title: String, subtitle: String? = null, ourNode: Node?, showNodeChip: Boolean, canNavigateUp: Boolean, onNavigateUp: () -> Unit, actions: @Composable () -> Unit, onClickChip: (Node) -> Unit, brandingContent: @Composable () -> Unit = { EventAwareBranding() })
Link copied to clipboard
fun MaterialBatteryInfo(modifier: Modifier = Modifier, level: Int?, voltage: Float? = null, contentColor: Color = MaterialTheme.colorScheme.onSurface)
Link copied to clipboard
fun MaterialBluetoothSignalInfo(rssi: Int, modifier: Modifier = Modifier)
Link copied to clipboard
fun MaterialSignalInfo(signalBars: Int, modifier: Modifier = Modifier, signalStrengthValue: String? = null, typeIcon: ImageVector? = null)

A composable that displays a signal strength indicator with an icon and optional text value. The icon and its color change based on the number of signal bars.

Link copied to clipboard
fun MenuFAB(expanded: Boolean, onExpandedChange: (Boolean) -> Unit, items: List<MenuFABItem>, modifier: Modifier = Modifier, contentDescription: String? = null, testTag: String? = null)
Link copied to clipboard
fun MeshtasticAppShell(multiBackstack: MultiBackstack, uiViewModel: UIViewModel, hostModifier: Modifier = Modifier, content: @Composable () -> Unit)

Shared shell for setting up global UI logic across platforms (Android, Desktop).

Link copied to clipboard
fun MeshtasticCommonAppSetup(uiViewModel: UIViewModel, onNavigateToTracerouteMap: (destinationNodeNum: Int, requestId: Int, logUuid: String?) -> Unit)

Common application-level setup for all Meshtastic platforms (Android, Desktop, etc.).

Link copied to clipboard
fun MeshtasticDialog(modifier: Modifier = Modifier, title: String? = null, titleRes: StringResource? = null, message: String? = null, messageRes: StringResource? = null, html: String? = null, icon: ImageVector? = null, text: @Composable () -> Unit? = null, confirmText: String? = null, confirmTextRes: StringResource? = null, onConfirm: () -> Unit? = null, dismissText: String? = null, dismissTextRes: StringResource? = null, onDismiss: () -> Unit? = null, choices: Map<String, () -> Unit> = emptyMap(), dismissable: Boolean = true)

A comprehensive and flexible dialog component for the Meshtastic application.

Link copied to clipboard
fun MeshtasticImportFAB(onImport: (String) -> Unit, modifier: Modifier = Modifier, sharedContact: SharedContact? = null, onDismissSharedContact: () -> Unit = {}, onShareChannels: () -> Unit? = null, onShareContact: () -> Unit? = null, isContactContext: Boolean = true, testTag: String? = null, importDialog: @Composable (SharedContact, () -> Unit) -> Unit = { contact, dismiss -> SharedContactImportDialog(sharedContact = contact, onDismiss = dismiss) })

Unified Floating Action Button for importing Meshtastic data (Contacts, Channels, etc.) via NFC, QR, or URL. Handles the SharedContactImportDialog if a contact is pending import.

Link copied to clipboard
fun MeshtasticNavDisplay(multiBackstack: MultiBackstack, entryProvider: (key: NavKey) -> NavEntry<NavKey>, modifier: Modifier = Modifier)

Shared NavDisplay wrapper that configures the standard Meshtastic entry decorators, scene strategies, and transition animations for all platform hosts.

fun MeshtasticNavDisplay(backStack: NavBackStack<NavKey>, onBack: () -> Unit? = null, entryProvider: (key: NavKey) -> NavEntry<NavKey>, modifier: Modifier = Modifier)

Shared NavDisplay wrapper for a single backstack.

Link copied to clipboard
fun MeshtasticNavigationSuite(multiBackstack: MultiBackstack, uiViewModel: UIViewModel, modifier: Modifier = Modifier, content: @Composable () -> Unit)

Shared adaptive navigation shell using NavigationSuiteScaffold.

Link copied to clipboard
fun MeshtasticResourceDialog(modifier: Modifier = Modifier, titleRes: StringResource, messageRes: StringResource, confirmTextRes: StringResource? = null, dismissTextRes: StringResource? = null, onConfirm: () -> Unit? = null, onDismiss: () -> Unit? = null, dismissable: Boolean = true)

A simplified MeshtasticDialog using only string resources.

Link copied to clipboard
fun MeshtasticSnackbarProvider(snackbarManager: SnackbarManager, modifier: Modifier = Modifier, hostModifier: Modifier = Modifier, content: @Composable () -> Unit)

Shared composable that observes SnackbarManager.events and provides a global SnackbarHostState.

Link copied to clipboard
fun MeshtasticTextDialog(modifier: Modifier = Modifier, titleRes: StringResource, message: String, confirmTextRes: StringResource? = null, dismissTextRes: StringResource? = null, onConfirm: () -> Unit? = null, onDismiss: () -> Unit? = null, dismissable: Boolean = true)

A simplified MeshtasticDialog using a title resource and a plain text message.

Link copied to clipboard
fun NfcDisabledDialog(titleRes: StringResource, onDismiss: () -> Unit)

Prompt shown when an NFC action (scan or write) is requested while NFC is turned off. Offers to open system settings. titleRes lets the caller frame it for the specific action (e.g. scan vs write).

Link copied to clipboard
fun nodeBorderStroke(nodeColor: Color, active: Boolean): BorderStroke?

Node-colored outline; active (selected / online) uses a stronger alpha. Null when there's no node color.

Link copied to clipboard
fun Modifier.nodeCardGlow(lastHeard: Int, nodeColor: Color): Modifier

A modifier that applies a glow animation to a node card when a packet is received.

Link copied to clipboard
fun NodeChip(modifier: Modifier = Modifier, node: Node, onClick: (Node) -> Unit? = null)
Link copied to clipboard
Link copied to clipboard
fun NodeIdInfo(id: String, modifier: Modifier = Modifier, contentColor: Color = MaterialTheme.colorScheme.onSurface)
Link copied to clipboard
fun NodeItem(thisNode: Node?, thatNode: Node, distanceUnits: Int, tempInFahrenheit: Boolean, connectionState: ConnectionState, modifier: Modifier = Modifier, onClick: () -> Unit = {}, onLongClick: () -> Unit? = null, deviceType: DeviceType? = null, isActive: Boolean = false, showTelemetry: Boolean = true, deviceImageUrl: String? = null)
Link copied to clipboard
fun NodeItemCompact(thisNode: Node?, thatNode: Node, distanceUnits: Int, modifier: Modifier = Modifier, onClick: () -> Unit = {}, onLongClick: () -> Unit? = null, isActive: Boolean = false, showPower: Boolean = true, showLastHeard: Boolean = true, lastHeardIsRelative: Boolean = true, showLocation: Boolean = true, showHops: Boolean = true, showSignal: Boolean = true, showChannel: Boolean = true, showRole: Boolean = true, showTelemetry: Boolean = true, tempInFahrenheit: Boolean = false, deviceImageUrl: String? = null)
Link copied to clipboard
fun NodeKeyStatusIcon(modifier: Modifier = Modifier, hasPKC: Boolean, mismatchKey: Boolean, publicKey: ByteString? = null)

function to display information about the current node's encryption key.

Link copied to clipboard
fun NodeSecurityIcons(thatNode: Node, modifier: Modifier = Modifier, iconSize: Dp = 20.dp)

Key status (always status-colored) + the signed-node shield share one scrim chip so both stay legible.

Link copied to clipboard
fun NodeSignalQuality(snr: Float, rssi: Int, modifier: Modifier = Modifier, modemPreset: Config.LoRaConfig.ModemPreset? = LocalModemPreset.current)

Displays the snr and rssi color coded based on the signal quality, along with a human readable description and related icon.

Link copied to clipboard
fun NodeSignedStatusIcon(modifier: Modifier = Modifier)

The "signed node" shield (XEdDSA), tappable like NodeKeyStatusIcon — tap opens SignedNodeDialog.

Link copied to clipboard
fun NodeStatusIcons(isThisNode: Boolean, isUnmessageable: Boolean, isFavorite: Boolean, isMuted: Boolean, connectionState: ConnectionState, modifier: Modifier = Modifier, deviceType: DeviceType? = null, contentColor: Color = LocalContentColor.current)
Link copied to clipboard
fun nodeTintedContainer(nodeColor: Color, fraction: Float = NODE_TINT_NORMAL): Color

Neutral card surface washed fraction toward nodeColor; falls back to the plain surface when transparent.

Link copied to clipboard
fun OverlayIconInfo(icon: ImageVector, overlayIcon: ImageVector, contentDescription: String, modifier: Modifier = Modifier, label: String? = null, text: String? = null, style: TextStyle = MaterialTheme.typography.labelMedium, contentColor: Color = MaterialTheme.colorScheme.onSurface)
Link copied to clipboard
fun PaxcountInfo(pax: String, modifier: Modifier = Modifier, contentColor: Color = MaterialTheme.colorScheme.onSurface)
Link copied to clipboard
fun PermissionRecoveryCard(state: PermissionUiState, rationale: String, modifier: Modifier = Modifier)

Convenience overload that reads the status and actions directly from a PermissionUiState.

Link copied to clipboard

Shared placeholder screen for desktop/JVM feature stubs that are not yet implemented. Displays a centered label in MaterialTheme.typography.headlineMedium.

Link copied to clipboard
fun PositionPrecisionPreference(value: Int, enabled: Boolean, onValueChanged: (Int) -> Unit, modifier: Modifier = Modifier)
Link copied to clipboard
Link copied to clipboard
fun PowerInfo(value: String, modifier: Modifier = Modifier, label: String? = null, contentColor: Color = MaterialTheme.colorScheme.onSurface)
Link copied to clipboard
Link copied to clipboard
fun PreferenceCategory(text: String, modifier: Modifier = Modifier, content: @Composable ColumnScope.() -> Unit? = null)
Link copied to clipboard
@Preview(showBackground = true)
fun PreferenceCategoryPreview()
Link copied to clipboard
Link copied to clipboard
fun PreferenceFooter(modifier: Modifier = Modifier, enabled: Boolean = true, negativeText: String? = null, onNegativeClicked: () -> Unit = {}, positiveText: String? = null, onPositiveClicked: () -> Unit = {})
Link copied to clipboard
fun PressureInfo(pressure: String, modifier: Modifier = Modifier, contentColor: Color = MaterialTheme.colorScheme.onSurface)
Link copied to clipboard
@Preview(name = "All Security Icons with Dialog")
fun PreviewAllSecurityIconsWithDialog()
Link copied to clipboard
@Preview(showBackground = true, name = "Channel Context with Sharing")
fun PreviewImportFABChannel()
Link copied to clipboard
@Preview(showBackground = true, name = "Contact Context")
fun PreviewImportFABContact()
Link copied to clipboard
fun QrDialog(title: String, uriString: String, onDismiss: () -> Unit)
Link copied to clipboard
fun RecoveryCard(message: String, actionLabel: String, onAction: () -> Unit, modifier: Modifier = Modifier, actionIcon: ImageVector? = null, onDismiss: () -> Unit? = null, dismissContentDescription: String? = null)

A reusable error-state card: an errorContainer message box plus one full-width recovery action. Generalizes the compass warning/recovery pattern so any feature can present context plus a single corrective action (request a permission, open Bluetooth/Wi-Fi/app settings, etc.).

Link copied to clipboard
fun RegularPreference(title: String, subtitle: AnnotatedString, onClick: () -> Unit, modifier: Modifier = Modifier, enabled: Boolean = true, summary: String? = null, trailingIcon: ImageVector? = null, dropdownMenu: @Composable () -> Unit = {})
fun RegularPreference(title: String, subtitle: String, onClick: () -> Unit, modifier: Modifier = Modifier, enabled: Boolean = true, summary: String? = null, trailingIcon: ImageVector? = null, dropdownMenu: @Composable () -> Unit = {})
Link copied to clipboard
@Preview(showBackground = true)
fun RegularPreferencePreview()
Link copied to clipboard
fun rememberDragDropState(lazyListState: LazyListState, headerCount: Int = 0, onMove: (Int, Int) -> Unit): DragDropState
Link copied to clipboard
Link copied to clipboard
fun RoleInfo(role: String, modifier: Modifier = Modifier, contentColor: Color = MaterialTheme.colorScheme.onSurface)
fun RoleInfo(role: Config.DeviceConfig.Role, modifier: Modifier = Modifier, contentColor: Color = MaterialTheme.colorScheme.onSurface)
Link copied to clipboard
fun Rssi(rssi: Int, modifier: Modifier = Modifier)
Link copied to clipboard
fun SatelliteCountInfo(modifier: Modifier = Modifier, satCount: Int, contentColor: Color = MaterialTheme.colorScheme.onSurface)
Link copied to clipboard
fun SecurityIcon(channel: Channel, baseContentDescription: String = stringResource(Res.string.security_icon_description), externalOnClick: () -> Unit? = null)

Overload for SecurityIcon that takes a Channel object to determine its security state.

fun SecurityIcon(securityState: SecurityState, baseContentDescription: String = stringResource(Res.string.security_icon_description), externalOnClick: () -> Unit? = null)

Displays an icon representing the security status of a channel. Clicking the icon shows a detailed help dialog.

fun SecurityIcon(channelSet: ChannelSet, channelIndex: Int, baseContentDescription: String = stringResource(Res.string.security_icon_description), externalOnClick: () -> Unit? = null)

Overload for SecurityIcon that takes an AppOnlyProtos.ChannelSet and a channel index. If the channel at the given index is not found, nothing is rendered.

fun SecurityIcon(channelSet: ChannelSet, channelName: String, baseContentDescription: String = stringResource(Res.string.security_icon_description), externalOnClick: () -> Unit? = null)

Overload for SecurityIcon that takes an AppOnlyProtos.ChannelSet and a channel name. If a channel with the given name is not found, nothing is rendered. This overload optimizes lookup by name by memoizing a map of channel names to settings.

fun SecurityIcon(channelSettings: ChannelSettings, loraConfig: Config.LoRaConfig, baseContentDescription: String = stringResource(Res.string.security_icon_description), externalOnClick: () -> Unit? = null)

Overload for SecurityIcon that enables recomposition when making changes to the ChannelSettings.

fun SecurityIcon(isLowEntropyKey: Boolean, isPreciseLocation: Boolean = false, isMqttEnabled: Boolean = false, baseContentDescription: String = stringResource(Res.string.security_icon_description), externalOnClick: () -> Unit? = null)

Overload for SecurityIcon that derives the SecurityState from boolean flags.

Link copied to clipboard
fun SharedContactDialog(contact: Node?, onDismiss: () -> Unit)

Displays a dialog with the contact's information as a QR code and URI.

Link copied to clipboard
fun SharedContactImportDialog(sharedContact: SharedContact, onDismiss: () -> Unit)

Displays a dialog for importing a shared contact.

Link copied to clipboard

Shared composable that conditionally renders SharedContactDialog and ScannedQrCodeDialog when the device is connected and requests are pending.

Link copied to clipboard
fun SignalInfo(modifier: Modifier = Modifier, node: Node, contentColor: Color = MaterialTheme.colorScheme.onSurface)
Link copied to clipboard
Link copied to clipboard
@Preview(showBackground = true)
fun SignalInfoSimplePreview()
Link copied to clipboard
fun SignedIntegerEditTextPreference(title: String, value: Int, enabled: Boolean, keyboardActions: KeyboardActions, onValueChanged: (Int) -> Unit, modifier: Modifier = Modifier, summary: String? = null, onFocusChanged: (FocusState) -> Unit = {}, trailingIcon: @Composable () -> Unit? = null)
Link copied to clipboard
fun SignedNodeDialog(onDismiss: () -> Unit)

The plain-language "signed node" explanation, shared by NodeSignedStatusIcon and the node-details signed row.

Link copied to clipboard
fun <T> SliderPreference(title: String, enabled: Boolean, items: List<Pair<T, String>>, selectedValue: T, onValueChange: (T) -> Unit, modifier: Modifier = Modifier, summary: String? = null)
Link copied to clipboard
Link copied to clipboard
@Preview(showBackground = true)
fun SliderPreferencePreview()
Link copied to clipboard
fun LazyListState.smartScrollToIndex(coroutineScope: CoroutineScope, targetIndex: Int)

Scrolls to the targetIndex while applying the same fast-scroll optimisation used by smartScrollToTop.

Link copied to clipboard
fun LazyListState.smartScrollToTop(coroutineScope: CoroutineScope)

Executes the smart scroll-to-top policy.

Link copied to clipboard
fun Snr(snr: Float, modifier: Modifier = Modifier, modemPreset: Config.LoRaConfig.ModemPreset? = LocalModemPreset.current)
Link copied to clipboard
fun SnrAndRssi(snr: Float, rssi: Int, modemPreset: Config.LoRaConfig.ModemPreset? = LocalModemPreset.current)

Displays the snr and rssi with color depending on the values respectively.

Link copied to clipboard
fun SoilMoistureInfo(moisture: String, modifier: Modifier = Modifier, contentColor: Color = MaterialTheme.colorScheme.onSurface)
Link copied to clipboard
fun SoilTemperatureInfo(temp: String, modifier: Modifier = Modifier, contentColor: Color = MaterialTheme.colorScheme.onSurface)
Link copied to clipboard
fun StatusSurface(modifier: Modifier = Modifier, shape: Shape = CircleShape, contentPadding: PaddingValues = PaddingValues(horizontal = 6.dp, vertical = 2.dp), horizontalArrangement: Arrangement.Horizontal = Arrangement.spacedBy(4.dp), content: @Composable RowScope.() -> Unit)

Wraps status-colored content (e.g. Snr/Rssi, a signed shield) on the StatusScrim so the colors stay legible regardless of the surface underneath. CircleShape gives a pill for a row of content and a circle behind a solo icon. Render the status content in its true token color inside.

Link copied to clipboard
fun SwitchListItem(checked: Boolean, text: String, onClick: () -> Unit, modifier: Modifier = Modifier, textColor: Color = Color.Unspecified, enabled: Boolean = true, leadingIcon: ImageVector? = null, leadingIconTint: Color = Color.Unspecified)

A toggleable switch list item.

Link copied to clipboard
@Preview(showBackground = true)
fun SwitchListItemPreview()
Link copied to clipboard
fun SwitchPreference(modifier: Modifier = Modifier, title: String, summary: String = "", checked: Boolean, enabled: Boolean, onCheckedChange: (Boolean) -> Unit, padding: PaddingValues? = null, containerColor: Color? = null, loading: Boolean = false)
Link copied to clipboard
@Preview(showBackground = true)
fun SwitchPreferencePreview()
Link copied to clipboard
fun TemperatureInfo(temp: String, modifier: Modifier = Modifier, contentColor: Color = MaterialTheme.colorScheme.onSurface)
Link copied to clipboard
fun TextDividerPreference(title: AnnotatedString, modifier: Modifier = Modifier, enabled: Boolean = true, trailingIcon: ImageVector? = null)
fun TextDividerPreference(title: String, modifier: Modifier = Modifier, enabled: Boolean = true, trailingIcon: ImageVector? = null)
Link copied to clipboard
@Preview(showBackground = true)
fun TextDividerPreferencePreview()
Link copied to clipboard
fun TitledCard(title: String?, modifier: Modifier = Modifier, content: @Composable ColumnScope.() -> Unit)
Link copied to clipboard
Link copied to clipboard
fun TracerouteAlertHandler(uiViewModel: UIViewModel, onNavigateToMap: (destinationNodeNum: Int, requestId: Int, logUuid: String?) -> Unit)

Handles the display of the traceroute alert when a response is received. Consolidates the side effect logic from the main application screens into common code.

Link copied to clipboard
fun TransportIcon(transport: Int, viaMqtt: Boolean, modifier: Modifier = Modifier, tint: Color = LocalContentColor.current)
Link copied to clipboard
fun transportInfo(transport: Int, viaMqtt: Boolean): Pair<ImageVector, String>?

Icon + short label for a TransportMechanism value, or null if unknown. Single source for transport badging.

Link copied to clipboard
fun UptimeInfo(uptime: String, modifier: Modifier = Modifier, contentColor: Color = MaterialTheme.colorScheme.onSurface)