Skip to content

Commit b60ece9

Browse files
authored
Merge pull request #410 from FlutterFlow/fix/responsive-values
Add Responsive Value Section
2 parents b1d7ac8 + 32307f2 commit b60ece9

File tree

1 file changed

+55
-1
lines changed

1 file changed

+55
-1
lines changed

docs/ff-concepts/layout/responsive-layout.md

Lines changed: 55 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -196,4 +196,58 @@ To implement this, we can go to its widget properties and toggle the device icon
196196

197197
And now you have a more responsive screen for this shopping app use case that looks good in both mobile and desktop formats.
198198

199-
With these adjustments, your shopping app now boasts a highly responsive screen that seamlessly adapts to both mobile and desktop formats. This ensures an optimal user experience across all devices, maintaining both functionality and aesthetic appeal.
199+
With these adjustments, your shopping app now boasts a highly responsive screen that seamlessly adapts to both mobile and desktop formats. This ensures an optimal user experience across all devices, maintaining both functionality and aesthetic appeal.
200+
201+
## Responsive Value
202+
203+
**Responsive Values** allow you to define different property values, such as widths, heights, font sizes, or padding, for different device sizes (mobile, tablet, desktop, and wide). At runtime, your app evaluates the screen width and automatically applies the appropriate value based on your configurations.
204+
205+
:::info[possible use cases]
206+
207+
- **Adaptive Layouts**: Automatically adjust element sizes to deliver a consistent UI across devices.
208+
- **Better Readability**: Increase font size on larger screens to improve legibility.
209+
- **Improved Spacing**: Use different padding or margins on tablets and desktops to optimize content flow.
210+
211+
:::
212+
213+
To set a responsive value, select a widget and choose a property that supports responsiveness. Click **Set from Variable > Responsive Value**, then enter different values for each screen size:
214+
215+
- Mobile (below `Breakpoint Small`)
216+
- Tablet (below `Breakpoint Medium`)
217+
- Desktop (below `Breakpoint Large`)
218+
- Wide (above `Breakpoint Large`)
219+
220+
As you preview on different devices, the property will automatically adjust based on the selected screen size.
221+
222+
:::tip[Customizing Breakpoints]
223+
224+
You can adjust the default screen size breakpoints (mobile, tablet, desktop, wide) in FlutterFlow’s Theme Settings. See how to [**Customize Breakpoints**](#customize-responsive-breakpoints).
225+
226+
:::
227+
228+
229+
<div style={{
230+
position: 'relative',
231+
paddingBottom: 'calc(56.67989417989418% + 41px)', // Keeps the aspect ratio and additional padding
232+
height: 0,
233+
width: '100%'}}>
234+
<iframe
235+
src="https://demo.arcade.software/0XfY0BCqlcIrsXhOGlCh?embed&show_copy_link=true"
236+
title=""
237+
style={{
238+
position: 'absolute',
239+
top: 0,
240+
left: 0,
241+
width: '100%',
242+
height: '100%',
243+
colorScheme: 'light'
244+
}}
245+
frameborder="0"
246+
loading="lazy"
247+
webkitAllowFullScreen
248+
mozAllowFullScreen
249+
allowFullScreen
250+
allow="clipboard-write">
251+
</iframe>
252+
</div>
253+
<p></p>

0 commit comments

Comments
 (0)