How can I prevent dismissing a component using the Android back button?

Actions & Logic

I am creating a "VPN detected" component in my FlutterFlow app that displays a message:
"You cannot use a VPN while using the app."

I am using a Flutter VPN package to detect active VPN usage. However, when I press the back button on my Android device, the component gets dismissed automatically. I do not want this to happen. The component should only dismiss when the VPN is turned off.

How can I prevent the Android back button from dismissing the component?

What have you tried so far?

I have enabled the Non-dismissible option in the Action Flow, but it only prevents dismissal when tapping outside the component. I also want to disable dismissal when pressing the Android back button.

Did you check FlutterFlow's Documentation for this topic?
Yes
1
3 replies