diff --git a/widget/src/scrollable.rs b/widget/src/scrollable.rs index 6dd593cb..9ba8c39b 100644 --- a/widget/src/scrollable.rs +++ b/widget/src/scrollable.rs @@ -49,12 +49,20 @@ where /// Creates a new vertical [`Scrollable`]. pub fn new( content: impl Into>, + ) -> Self { + Self::with_direction(content, Direction::default()) + } + + /// Creates a new vertical [`Scrollable`]. + pub fn with_direction( + content: impl Into>, + direction: impl Into, ) -> Self { Scrollable { id: None, width: Length::Shrink, height: Length::Shrink, - direction: Direction::default(), + direction: direction.into(), content: content.into(), on_scroll: None, class: Theme::default(),