Skip to main content

application

Function application 

Source
pub fn application<State, Message, Renderer>(
    boot: impl BootFn<State, Message>,
    update: impl UpdateFn<State, Message>,
    view: impl for<'a> ViewFn<'a, State, Message, Theme, Renderer>,
) -> Application<impl Program<State = State, Message = Message, Theme = Theme>>
where State: 'static, Message: Send + 'static, Renderer: Renderer,
Expand description

Creates an iced application with the bundled Material fonts preloaded.

This is equivalent to iced::application() followed by with_material_fonts.

Examples found in repository?
examples/quickstart/app.rs (line 11)
10pub fn main() -> iced::Result {
11    material::application(boot, update, view)
12        .title("material-ui-rs quick start")
13        .subscription(subscription)
14        .window(material::window_with_min_size(WINDOW_SIZE, MIN_WINDOW_SIZE))
15        .run()
16}
More examples
Hide additional examples
examples/showcase/app.rs (line 15)
12pub fn main() -> iced::Result {
13    let window_size = Size::new(1080.0, 980.0);
14
15    material::application(boot, update, view)
16        .title("material-ui-rs showcase")
17        .subscription(subscription)
18        .theme(theme)
19        .window(material::window_with_min_size(
20            window_size,
21            Size::new(420.0, 720.0),
22        ))
23        .run()
24}