iced::widget

Function image

Source
pub fn image<Handle>(handle: impl Into<Handle>) -> Image<Handle>
Available on crate feature image only.
Expand description

Creates a new Image.

Images display raster graphics in different formats (PNG, JPG, etc.).

ยงExample

use iced::widget::image;

enum Message {
    // ...
}

fn view(state: &State) -> Element<'_, Message> {
    image("ferris.png").into()
}