flutter showbottomsheet showmodalbottomsheet底部弹出框

2019独角兽企业重金招聘Python工程师标准>>> hot3.png

关闭的方法:向下滑动即可关闭。

 

onPressed: (){
           Scaffold.of(context).showBottomSheet((BuildContext context){
             return Row(
               mainAxisAlignment: MainAxisAlignment.spaceAround,
               children: [
               IconButton(icon: Icon(Icons.shop_two), onPressed: (){

               }),
               IconButton(icon: Icon(Icons.shop_two), onPressed: (){

               })
             ],);
           });
       }),

showModalBottomSheet(
    context: context,
    builder: (BuildContext context){
      return new Column(
        mainAxisSize: MainAxisSize.min,
        children: [
          new ListTile(
            leading: new Icon(Icons.video_library),
            title: new Text("视频"),
            onTap: () async {
              Navigator.pop(context);
            },
          ),
          new ListTile(
            leading: new Icon(Icons.photo_library),
            title: new Text("图片"),
            onTap: _selectImagesss
          ),
        ],
      );
    }
);

转载于:https://my.oschina.net/u/554046/blog/2980609

你可能感兴趣的:(flutter showbottomsheet showmodalbottomsheet底部弹出框)