constrained_scrollable_views

Creator: coderz1093

Last updated:

0 purchases

constrained_scrollable_views Image
constrained_scrollable_views Images

Languages

Categories

Add to Cart

Description:

constrained scrollable views

Constrained Scrollable Views #





Set of useful scrollable views includes ConstrainedScrollView, ScrollableColumn, and ScrollableRow.

ConstrainedScrollView is a combination of LayoutBuilder and SingleChildScrollView.
ScrollableColumn is Column wrapped by ConstrainedScrollView.
ScrollableRow is Row wrapped by ConstrainedScrollView.

Usage #
Example of using ConstrainedScrollView:
ConstrainedScrollView(
padding: const EdgeInsets.all(8),
physics: const BouncingScrollPhysics(),
constraintsBuilder: (constraints) => BoxConstraints(
minWidth: constraints.maxWidth,
minHeight: constraints.maxHeight,
),
child: const Center(
child: Text('ScrollView value'),
),
)
copied to clipboard
Example of using ScrollableColumn:
ScrollableColumn(
padding: const EdgeInsets.all(8),
physics: const BouncingScrollPhysics(),
constraintsBuilder: (constraints) => BoxConstraints(
minHeight: constraints.maxHeight,
),
children: [
for (var i = 0; i <= 100; i++)
Padding(
padding: const EdgeInsets.all(4),
child: Text('Column value: $i'),
),
],
)
copied to clipboard
Example of using ScrollableRow:
ScrollableRow(
padding: const EdgeInsets.all(8),
physics: const BouncingScrollPhysics(),
constraintsBuilder: (constraints) => BoxConstraints(
minWidth: constraints.maxWidth,
),
children: [
for (var i = 0; i <= 100; i++)
Padding(
padding: const EdgeInsets.all(4),
child: Text('Row value: $i'),
),
],
)
copied to clipboard

License

For personal and professional use. You cannot resell or redistribute these repositories in their original state.

Files In This Product:

Customer Reviews

There are no reviews.