v1.0.4
constrained_scrollable_views
一组有用的可滚动视图包括 ConstrainedScrollView、ScrollableColumn 和 ScrollableRow。
44喜欢 101近 30 天下载160Pub 分数
AndroidiOSWebmacOSWindowsLinux
一组有用的可滚动视图包括 ConstrainedScrollView、ScrollableColumn 和 ScrollableRow。
{"sdk":"flutter"}{"sdk":"flutter"}^6.0.0以下为英文项目原文快照,最新内容请访问 GitHub。
Pub style: very good analysis License: MIT
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.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'),
),
)
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'),
),
],
)
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'),
),
],
)