Intercept and handle Toggle Button state changes

Widgets & Design

Hi everyone,

Iโ€™m working on a FlutterFlow project and need help with intercepting/listening to the state changes of a toggle button. Specifically, I want to show a confirm popup prior to having the toggle button state changed and if cancelled i need to revert the toggle button to original state.

Does anyone know the best way to achieve this in FlutterFlow? Is there a built-in mechanism for this, or would I need to use custom actions or backend workflows? Any advice or examples would be greatly appreciated!

Thanks in advance!

What have you tried so far?

I am using events On Toggle On and On Toggle Off to intercept the event but i am not able to revert the toggle state

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