如何使flatter中的闪屏背景透明(适用于Android和IOS)?
我想使启动屏幕背景透明,这样当应用程序启动时,屏幕上只显示一个图标 到目前为止,我在针对Android的launch_background.xml中所做的工作:如何使flatter中的闪屏背景透明(适用于Android和IOS)?,android,ios,flutter,Android,Ios,Flutter,我想使启动屏幕背景透明,这样当应用程序启动时,屏幕上只显示一个图标 到目前为止,我在针对Android的launch_background.xml中所做的工作: <?xml version="1.0" encoding="utf-8"?> <!-- Modify this file to customize your launch splash screen --> <layer-list xmlns:android="http://schemas.android.
<?xml version="1.0" encoding="utf-8"?>
<!-- Modify this file to customize your launch splash screen -->
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
<item android:drawable="@android:color/transparent" />
<item>
<bitmap
android:src="@drawable/index"
android:gravity="center"
/>
</item>
</layer-list>
但我得到的是一个黑色背景,比如:
形象
我想要的是这样的东西:
如何正确处理这个问题?谢谢大家!
顺便说一句:IOS呢?在
scaffold
中使用Background
颜色,并将Opacity
设置为黑色,如下所示:
Colors.black.withOpacity(0.5) // change this opacity as per your requirement
您希望通过透明度显示什么?电话背景?这不是它的工作原理。该应用程序有自己的窗口。黑色背景是应用程序的“背后”。@Paulw11嗨,我想要的是这样的:你绝对不能在iOS上这么做。