【发布时间】:2020-11-09 11:49:27
【问题描述】:
我使用flutter函数showmodalbottomsheet来显示一个带有customscroll视图的页面。
但是当滚动视图的滚动过度滚动时出现问题我想滚动底部而不是过度滚动customscrollview。
如何选择要使用的卷轴?
比如我想做点赞的Facebook评论页面:
【问题讨论】:
标签: flutter flutter-showmodalbottomsheet
我使用flutter函数showmodalbottomsheet来显示一个带有customscroll视图的页面。
但是当滚动视图的滚动过度滚动时出现问题我想滚动底部而不是过度滚动customscrollview。
如何选择要使用的卷轴?
比如我想做点赞的Facebook评论页面:
【问题讨论】:
标签: flutter flutter-showmodalbottomsheet
你可能需要的是DraggableScrollableSheet 。
showModalBottomSheet(
isScrollControlled: true,
context: context,
builder: (context) => DraggableScrollableSheet(
builder: (context, scrollController) => SingleChildScrollView(
controller: scrollController,
child: Column(
children: [
Container(
color: Colors.purple,
height: 100,
),
Container(
color: Colors.orange,
height: 300,
),
Container(
color: Colors.black,
height: 300,
),
],
),
),
),
),
(当我偶然发现你的问题时,我也在寻找答案,决定分享我的研究结果:) 希望它对你有帮助!)
【讨论】: