cosmic::iced::widget

Function image

source
pub fn image<'a, Handle>(handle: impl Into<Handle>) -> Image<'a, Handle>
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()
}