I’m currently creating a small application which is creating a window from a function which takes a few arguments. It is currently using the following code:
let _ = iced::application(
"title",
ApplicationState::update,
ApplicationState::view,
)
.centered()
.theme(ApplicationState::theme);
I want to pass multiple arguments from the function to the application state, which has the needed fields, but I can’t find a way to pass the needed argument during construction.
I already tried to implement the Application trait to the application state (similar to how it was done here), but the compiler can’t find a trait called Application; it tells me the Application I imported using use iced::Application; was a struct, which is correct, but I can’t find a trait with this name in the Iced crate.
Can anyone tell me, how I can solve this issue?