【发布时间】:2021-03-19 11:32:45
【问题描述】:
示例此屏幕简短,单击此红色横幅打开新页面。 有的请分享源码。enter image description here
【问题讨论】:
-
请分享您到目前为止尝试过的代码。堆栈溢出不是代码编写服务。看How to ask a good question
示例此屏幕简短,单击此红色横幅打开新页面。 有的请分享源码。enter image description here
【问题讨论】:
我不知道这是否是你想要的,但你可以这样做:
return GestureDetector(
onTap: () async {
await Navigator.of(context).push(
MaterialPageRoute(
builder: (context) => Page(), // The page you want
),
);
},
child: Child(), // The banner
);
【讨论】: