Flutter 有可能使背景透明吗?
有可能使背景透明吗Flutter 有可能使背景透明吗?,flutter,Flutter,有可能使背景透明吗我需要看到android launcher作为背景。 class MyAppT2 extends StatelessWidget { @override Widget build(BuildContext context) { return MaterialApp( home: Scaffold( backgroundColor: Colors.transparent, body:Container( col
我需要看到android launcher作为背景。
class MyAppT2 extends StatelessWidget {
@override
Widget build(BuildContext context) {
return MaterialApp(
home: Scaffold(
backgroundColor: Colors.transparent,
body:Container(
color: Colors.red.shade200,
margin: EdgeInsets.all(50),
child: Text("asdsa"),
),
)
);
}
}
现在背景为黑色,我需要显示android设备主页请仔细阅读并编辑您的问题。没有理由理解您的意思。语法自动更正使此问题请共享您现在拥有的代码。有几种不同的方法来配置背景,答案取决于您如何构建背景。更新请检查“背景透明”是什么意思如果您喜欢上面的方法,您将获得黑屏而不是脚手架颜色。