Function cosmic::widget::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()
}