如何创建可滚动的模态底页
How to create a scrollable modal bottomsheet
我想在 flutter 中创建 mobal bottomsheet。 Bottomsheet 将显示一半,当用户将其抬起时,它将打开到指定大小。
我搜索过但没有找到我想要的。我如何在不使用插件的情况下做到这一点
改为使用 DraggableScrollableSheet。
试试这个,bottom_sheet
以获得更多 here
有showStickyFlexibleBottomSheet
可以这样使用。
showStickyFlexibleBottomSheet(
minHeight: 0,
initHeight: 0.5,
maxHeight: 1,
headerHeight: 200,
context: context,
backgroundColor: Colors.white,
headerBuilder: (BuildContext context, double offset) {
return Container(
...
);
},
builder: (BuildContext context, double offset) {
return SliverChildListDelegate(
<Widget>[...],
);
},
anchors: [0, 0.5, 1],
);
我想在 flutter 中创建 mobal bottomsheet。 Bottomsheet 将显示一半,当用户将其抬起时,它将打开到指定大小。
我搜索过但没有找到我想要的。我如何在不使用插件的情况下做到这一点
改为使用 DraggableScrollableSheet。
试试这个,bottom_sheet
以获得更多 here
有showStickyFlexibleBottomSheet
可以这样使用。
showStickyFlexibleBottomSheet(
minHeight: 0,
initHeight: 0.5,
maxHeight: 1,
headerHeight: 200,
context: context,
backgroundColor: Colors.white,
headerBuilder: (BuildContext context, double offset) {
return Container(
...
);
},
builder: (BuildContext context, double offset) {
return SliverChildListDelegate(
<Widget>[...],
);
},
anchors: [0, 0.5, 1],
);