pub fn sticky<W>(content: W) -> Sticky<W>Expand description
Creates a new Sticky for the provided content.
The contents of a Sticky will be displayed on an overlay, inside the
visible bounds, whenever they would otherwise go out of view.
ยงExample
use iced::widget::{column, container, scrollable, sticky, space};
use iced::Fill;
enum Message {
// ...
}
fn view(state: &State) -> impl Widget<Message> {
scrollable(column![
sticky(container("I always stay in view!").width(Fill).padding(10)),
space().height(3000),
])
}