A list row.
A row of a list: chosen or not, pressed to choose it. .icon(..) puts an icon before the text.
Signature
pub const fn item<M>(text: &str, selected: bool) -> Item<'_, M>Methods
.on_select(message: M) -> Self— Sendsmessagewhen it is chosen (or pressed, in a menu)..icon(icon: fusuma_icons::Icon) -> Self— An icon before the text.
Example
use fusuma::{column, item};
let view = column((item("Inbox", true).on_select(0), item("Sent", false).on_select(1)));
let built = fusuma::doc::built::<i32, _>(&view);
assert_eq!(built.texts(), ["Inbox", "Sent"]);