use iced::widget; use crate::app; pub fn maybe_widget<'a>( condition: bool, widget: impl FnOnce() -> app::Element<'a>, ) -> app::Element<'a> { if condition { widget() } else { widget::space().into() } }