Allow passing external state to Application::new
This commit is contained in:
parent
6e9ab1cd6f
commit
c4c5216e3b
13 changed files with 103 additions and 60 deletions
|
|
@ -40,8 +40,9 @@ enum Message {
|
|||
impl Application for Todos {
|
||||
type Executor = iced::executor::Default;
|
||||
type Message = Message;
|
||||
type Flags = ();
|
||||
|
||||
fn new() -> (Todos, Command<Message>) {
|
||||
fn new(_flags: ()) -> (Todos, Command<Message>) {
|
||||
(
|
||||
Todos::Loading,
|
||||
Command::perform(SavedState::load(), Message::Loaded),
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue