[嗨,我正在尝试创建一个除了中间的圆圈之外的全黑屏幕。我写了一些创建黑屏的代码:
Stack(
...
Positioned.fill(
child: Container(
color: Colors.grey.withOpacity(0.5),
)
)
)
但是我面临的问题是,我不知道如何在屏幕上打一个圆孔,以致无法显示出堆栈中背后的内容。
提前感谢您的回答!
这应该为您工作。
Container(
color: Colors.black,
alignment: Alignment.center,
child: new SizedBox(
child: FloatingActionButton(
backgroundColor: Colors.white,
child: null,
onPressed: () {
print("Cliked");
},
))));