Implement width and height for responsive

This commit is contained in:
Héctor Ramón Jiménez 2025-08-21 03:30:13 +02:00
parent 7a7d562b03
commit 5050fcc7ac
No known key found for this signature in database
GPG key ID: 7CC46565708259A7
2 changed files with 36 additions and 15 deletions

View file

@ -2146,9 +2146,9 @@ where
/// Creates a new [`Responsive`] widget with a closure that produces its
/// contents.
///
/// The `view` closure will be provided with the current [`Size`] of
/// the [`Responsive`] widget and, therefore, can be used to build the
/// contents of the widget in a responsive way.
/// The `view` closure will receive the maximum available space for
/// the [`Responsive`] during layout. You can use this [`Size`] to
/// conditionally build the contents.
pub fn responsive<'a, Message, Theme, Renderer>(
f: impl Fn(Size) -> Element<'a, Message, Theme, Renderer> + 'a,
) -> Responsive<'a, Message, Theme, Renderer>