Search code examples
flutterwear-os

When I swipe from left to right, I don't want it to exit the wearos application in flutter


When I swipe from left to right, I don't want it to exit the wearos application (in flutter/wearos). What can I do for this?


Solution

  • actually, this path writes for kotlin and java in androiddevelopers but l can't see for flutter. so l wrote it for flutter. almost everything is same. you should open styles.xml(android/app/src/main/res/values/styles.xml).Then you should write false this in Launch theme. so it should looks like this

    <style name="LaunchTheme" parent="@android:style/Theme.Light.NoTitleBar">
            <!-- Show a splash screen on the activity. Automatically removed when
                 Flutter draws its first frame -->
            <item name="android:windowBackground">@drawable/launch_background</item>
            <item name="android:windowSwipeToDismiss">false</item>
        </style>