compose-rust 0.0.1

Declarative UI in Rust, rendered by an AOT-compiled Compose Multiplatform engine.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
package dev.darkpyonix.composerust.ui.platform

import androidx.activity.compose.BackHandler
import dev.darkpyonix.composerust.foundation.platformBackHandler

/**
 * Hands Android's back gesture and button to the widgets that go back on their own.
 *
 * A split pane showing its body on its own is the one today: back shows the side pane
 * again and tells the Host once, and anything else on the screen keeps the Activity's own
 * back.
 */
internal fun installAndroidBack() {
    platformBackHandler = { enabled, onBack -> BackHandler(enabled = enabled, onBack = onBack) }
}