cosmic::iced_widget

Function svg

source
pub fn svg<'a, Theme>(handle: impl Into<Handle>) -> Svg<'a, Theme>
where Theme: Catalog,
Expand description

Creates a new Svg widget from the given Handle.

Svg widgets display vector graphics in your application.

ยงExample

use iced::widget::svg;

enum Message {
    // ...
}

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