当我显示
CompositedTransformFollower
小部件时,我发现对话框拦截了点击事件。
final content = CompositedTransformFollower(
link: _link,
showWhenUnlinked: false,
offset: Offset(0, widget.height),
child: Stack(
children: [
GestureDetector(
onTap: () {
// close
},
child: Container(
color: Colors.black12,
),
),
Container(
clipBehavior: Clip.antiAlias,
decoration: const BoxDecoration(
color: Colors.white,
borderRadius: BorderRadius.vertical(bottom: Radius.circular(8)),
),
constraints: BoxConstraints(
maxHeight: contentHeight * entity.scale, //content height
),
child: entity.child, // content view
)
],
),
);
Navigator.of(context, rootNavigator: false)
.push(PageRouteBuilder(
pageBuilder: (context, animation, secondaryAnimation) => content,
))
.then((value) {
// close
});
起初,我展示了 Pop 使用的
overlay
但是当再次展示另一个对话框时出现了一些错误,overlay
Pop 掩盖了我的对话。我发现了issues
然后,我想用
Navigator.push
显示我的Pop,但是对话框拦截点击事件。
现在我该怎么做?