mirror of
https://github.com/openflocon/Flocon.git
synced 2026-05-17 12:18:29 +00:00
1.9 KiB
1.9 KiB
📈 Configurable Dashboards (from the mobile app)
Your Android application can define and expose custom dashboards, which Flocon renders dynamically in the desktop interface.
Use cases include:
- Displaying live business metrics
- Monitoring app state variables
- Debugging real-time values (e.g., geolocation, battery, app mode)
- Real time in-app variables editions
- Perform from the desktop app mobile callbacks
Dashboards are defined programmatically on the mobile side via the SDK, and they update live as data changes — making them ideal for live demos, QA testing, or in-field diagnostics.
userFlow.collect { user ->
Flocon.dashboard(id = "main") {
user?.let {
section(name = "User") {
text(label = "username", value = user.userName)
text(label = "fullName", value = user.fullName, color = Color.Red.toArgb())
text(label = "user id", value = user.id)
button(
text = "Change User Id",
id = "changeUserId",
onClick = {
userFlow.update { it.copy(userName = "__flo__") }
}
)
textField(
label = "Update Name",
placeHolder = "name",
id = "changeUserName",
value = user.fullName,
onSubmitted = { value ->
userFlow.update { it.copy(fullName = value) }
})
}
}
}
}