是否有其他方法可以更改脚手架抽屉的宽度? [英] Is there any alternative way to change the Scaffold drawer width?

查看:102
本文介绍了是否有其他方法可以更改脚手架抽屉的宽度?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当前Flutter Material直接不支持编辑脚手架抽屉控制器.他们的资料库中有个打开抽屉宽度的问题. 我们可以访问和更改宽度吗?还是存在自定义脚手架实现来更改行为?

Currently Flutter Material directly not supporting editing Scaffold drawer controller. There is issue opened in their library to set width of drawer. Is there any we can access and change width? or Is there custom scaffold implementation exist to change the behaviour?

推荐答案

只需复制

Just copy the Drawer source to a MyDrawer class and change _kWidth there.

@RémiRousselet建议用

As @RémiRousselet suggested wrapping the Drawer with

SizedBox(width: myWith: child myDrawer)

是更好的方法.

这篇关于是否有其他方法可以更改脚手架抽屉的宽度?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆