Application

Core interface for an Iced application following the Elm Architecture.

This interface defines the contract for building reactive applications where state changes are driven by messages and rendered through a view function.

Parameters

Model

The application's state type

Message

The type of messages that can update the state

Functions

Link copied to clipboard
abstract fun init(): Model

The initial state of the application.

Link copied to clipboard

Convenience operator function that runs this Application as a Composable.

Link copied to clipboard

Creates and runs an Iced application inside a Jetpack Compose context.

Link copied to clipboard
abstract fun update(model: Model, message: Message): Model

Pure function that updates the model based on a message.

Link copied to clipboard
abstract fun view(model: Model, dispatch: (Message) -> Unit): Element

Describes how the current model should be rendered. This function returns a tree of Elements that describe the UI.