加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 百科 > 正文

飞镖 – 有没有办法将高度设置为抽屉头?

发布时间:2020-12-14 14:52:31 所属栏目:百科 来源:网络整理
导读:我正在寻找一种方法来设置抽屉头的高度. 我有这个DrawerHeader: DrawerHeader( child: Text('Categories',style: TextStyle(color: Colors.white)),decoration: BoxDecoration( color: Colors.black ),margin: EdgeInsets.all(0.0),padding: EdgeInsets.all
我正在寻找一种方法来设置抽屉头的高度.
我有这个DrawerHeader:

DrawerHeader(
        child: Text('Categories',style: TextStyle(color: Colors.white)),decoration: BoxDecoration(
            color: Colors.black
        ),margin: EdgeInsets.all(0.0),padding: EdgeInsets.all(0.0)
    ))

但我没有看到将高度设置为抽屉的方法,这太大了.

解决方法

你用Container小部件包装它.

Container(
        height: 10.0,child: DrawerHeader(
            child: Text('Categories',decoration: BoxDecoration(
                    color: Colors.black
            ),padding: EdgeInsets.all(0.0)
      ),);

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读