Allow passing external state to Application::new

This commit is contained in:
Héctor Ramón Jiménez 2020-03-30 18:00:15 +02:00
parent 6e9ab1cd6f
commit c4c5216e3b
13 changed files with 103 additions and 60 deletions

View file

@ -30,8 +30,9 @@ enum Message {
impl Application for Stopwatch {
type Executor = iced_futures::executor::AsyncStd;
type Message = Message;
type Flags = ();
fn new() -> (Stopwatch, Command<Message>) {
fn new(_flags: ()) -> (Stopwatch, Command<Message>) {
(
Stopwatch {
duration: Duration::default(),