我正在寻找一种方法来设置抽屉头的高度.
我有这个DrawerHeader:
我有这个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) ),);