如何在Android设备的导航栏中添加渐变?

如何在Android设备的导航栏中添加渐变?,android,xml,flutter,dart,Android,Xml,Flutter,Dart,我有一个颤振应用程序,我正在尝试在该应用程序的NaviagtionBottomBar中添加一个渐变。 我已经设法添加了一个单一的颜色,但我不知道如何添加渐变 这是我的代码,这是我的输出 styles.xml <?xml version="1.0" encoding="utf-8"?> <resources> <style name="LaunchTheme" parent="@androi

我有一个颤振应用程序,我正在尝试在该应用程序的NaviagtionBottomBar中添加一个渐变。
我已经设法添加了一个单一的颜色,但我不知道如何添加渐变

这是我的代码,这是我的输出

styles.xml

<?xml version="1.0" encoding="utf-8"?>
<resources>
    <style name="LaunchTheme" parent="@android:style/Theme.Black.NoTitleBar">
        <item name="android:windowBackground">@drawable/launch_background</item>
        <item name="android:windowFullscreen">true</item>
    </style>
    <style name="NormalTheme" parent="@android:style/Theme.Black.NoTitleBar">
    <item name="android:windowDrawsSystemBarBackgrounds">true</item>
    <item name="android:navigationBarColor">@color/blue</item>
    <item name="android:windowLightNavigationBar">true</item>
    </style>
</resources>
<?xml version="1.0" encoding="utf-8"?>
<resources>
    <color name="blue">#87ceeb</color>
</resources>

@可绘制/发布背景
真的
真的
@颜色/蓝色
真的
colors.xml

<?xml version="1.0" encoding="utf-8"?>
<resources>
    <style name="LaunchTheme" parent="@android:style/Theme.Black.NoTitleBar">
        <item name="android:windowBackground">@drawable/launch_background</item>
        <item name="android:windowFullscreen">true</item>
    </style>
    <style name="NormalTheme" parent="@android:style/Theme.Black.NoTitleBar">
    <item name="android:windowDrawsSystemBarBackgrounds">true</item>
    <item name="android:navigationBarColor">@color/blue</item>
    <item name="android:windowLightNavigationBar">true</item>
    </style>
</resources>
<?xml version="1.0" encoding="utf-8"?>
<resources>
    <color name="blue">#87ceeb</color>
</resources>

#87ceeb

输出:

在您的dart代码中,您可以将
底部导航栏
小部件与容器包装在一起,并为容器的装饰属性设置
框装饰
。然后为
BoxDecoration

设置渐变,使其不是底部导航条。这是设备的导航栏。对不起。现在我明白你的意思了这有帮助吗?