How to overlay a widget on top of a flutter App?

后端 未结 2 1314
醉话见心
醉话见心 2020-12-18 21:38

I want a widget that will sit on top of the entire application. When I have tried to do this with Overlay.of(context).insert the overlay would later disappear a

2条回答
  •  青春惊慌失措
    2020-12-18 22:12

    Have you tried to add a Navigator as a child/descendant of your Scaffold? As far as I remember, the default navigator is in the MaterialApp, which is above everything. When you add your own Navigator, your routing will happen under the Scaffold rather than above it in the tree.

提交回复
热议问题