A stepper showing value.
Two buttons and the value between them; the app owns the number and shows it as text. .on_dec(m) and .on_inc(m) say what the buttons send.
Signature
pub fn stepper<M>(value: &str) -> Stepper<M>Methods
.on_dec(message: M) -> Self— Sendsmessagewhen the minus button is pressed..on_inc(message: M) -> Self— Sendsmessagewhen the plus button is pressed.
Example
use fusuma::stepper;
let quantity = 3;
let view = stepper("3").on_dec(quantity - 1).on_inc(quantity + 1);
let built = fusuma::doc::built::<i32, _>(&view);
assert!(built.texts().contains(&"3"));