【发布时间】:2019-08-16 20:11:49
【问题描述】:
这是我的印象,还是当我们在Drawer 上调用Navigator.pop 时,从InkWell 水龙头内,InkWell 启动画面根本不显示?这是预期的行为吗?有什么办法吗?
当用户单击我的Drawer 的标题时,我想关闭我的Drawer 并打开一个新的Route。代码工作正常,但用户点击没有反馈,因为我的标题周围的 InkWell 根本没有动画。如果我删除Navigator.pop(),它会按预期显示墨水飞溅,但当然,它不会关闭Drawer。
这是我正在做的事情的 sn-p:
Widget build(BuildContext context) {
return Drawer(
child: ListView(
children: <Widget>[
InkWell(
onTap: () {
Navigator.pop(context);
Navigator.popAndPushNamed(context, '/myRoute');
},
child: DrawerHeader(
...
【问题讨论】:
标签: flutter flutter-layout flutter-animation