我正在尝试使DraggableScrollableSheet出现在Stack中的GoogleMap上方,但是没有运气。有什么建议吗?
这是我正在尝试的内容
body: Stack(
children: <Widget>[
GoogleMap(
initialCameraPosition: CameraPosition(
target: LatLng(47.502941, 18.999161),
zoom: 1),
myLocationEnabled: true,
zoomControlsEnabled: true,
),
Positioned(
bottom: 0,
left: 0,
right: 0,
child: Container(
height: 400,
color: Colors.white,
child: DraggableScrollableSheet(
initialChildSize: 0.4,
minChildSize: 0.1,
maxChildSize: 1,
builder: (context, scrollController) {
return Column(
children: <Widget>[
ListView.builder(
//controller: myscrollController,
shrinkWrap: true,
itemCount: 25,
itemBuilder: (BuildContext context, int index) {
return ListTile(
title: Text(
'Dish $index',
style: TextStyle(color: Colors.black54),
));
},
),
],
);
},
),
),
);
尝试使用sliding_up_panel