地图在抽屉中重叠显示。如何解决这个问题?

时间:2018-09-06 09:31:08

标签: android ios flutter

我尝试使用MapView附加Google Maps,然后尝试将抽屉附加到我的应用栏中,但是当我打开抽屉时,地图与抽屉重叠,因此看不到抽屉中的项目。我该如何解决?

@override
Widget build(BuildContext context) {
//  var mq = MediaQuery.of(context);
  return new MaterialApp(
    home: new Scaffold(
      appBar: new AppBar(
        title: new Text("Map view example"),
      ),
     body:  new Column(
         mainAxisAlignment: MainAxisAlignment.center,
         children: <Widget>[
           new Container(
             height: 250.0,
             child: new Stack(
               children: <Widget>[
                 new Center(
                     child: new Container(
                       child: new Center(
                         heightFactor: 200.0,
                         widthFactor: 200.0,
                         child: showMap(),
                       ),
                       padding: const EdgeInsets.all(20.0),
                     )),

               ],
             ),
           ),
           new Container(
             padding: new EdgeInsets.only(top: 10.0),
             child: new Text(
               "Tap the map to interact",
               style: new TextStyle(fontWeight: FontWeight.bold),
             ),
           ),

         ],
       ),
      drawer: new Drawer(
        child: new Text("Drawer"),
      ),
     ),
  );
}

0 个答案:

没有答案