不允许:true,//不工作
showDragHandle:true,//在BottomSheet容器之外
这两个功能不适用于此底页
public void transmitting(transmitting context){
showModalBottomSheet(
context: context,
isScrollControlled: true,
isDismissible: true,
showDragHandle:true,
backgroundColor: Colors.transparent,
builder: (BuildContext context) {
return DraggableScrollableSheet(
initialChildSize: 0.5,
maxChildSize: 0.7, // Set the maximum height to 70% of the screen height
minChildSize: 0.2,
expand: false,
builder: (BuildContext context, ScrollController scrollController) {
return Container(
color: Colors.white, // Background color of the bottom sheet
child: SingleChildScrollView(
controller: scrollController,
child: Column(
children: [
// Your content here
],
),
),
);
},
);
},
); }
1条答案
按热度按时间9cbw7uwe1#
默认情况下,isDismissable:true检查文档[https://api.flutter.dev/flutter/material/showModalBottomSheet.html]还检查如何使用此函数