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

前端之家收集整理的这篇文章主要介绍了飞镖 – 有没有办法将高度设置为抽屉头?前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。
我正在寻找一种方法来设置抽屉头的高度.
我有这个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)
      ),);

猜你在找的Flutter相关文章