Implement pure version of todos example 🎉

The `Widget` trait in `iced_pure` needed to change a bit to make the
implementation of `Element::map` possible.

Specifically, the `children` method has been split into `diff` and
`children_state`.
This commit is contained in:
Héctor Ramón Jiménez 2022-02-12 17:21:28 +07:00
parent e3108494e5
commit bd22cc0bc0
No known key found for this signature in database
GPG key ID: 140CC052C94F138E
18 changed files with 917 additions and 96 deletions

View file

@ -17,12 +17,15 @@
//! [the original widgets]: crate::widget
//! [`button::State`]: crate::widget::button::State
//! [impure `Application`]: crate::Application
pub use iced_pure::{Element as _, *};
pub use iced_pure::{Element as _, Text as _, *};
/// A generic, pure [`Widget`].
pub type Element<'a, Message> =
iced_pure::Element<'a, Message, crate::Renderer>;
/// A pure text widget.
pub type Text = iced_pure::Text<crate::Renderer>;
mod application;
mod sandbox;