How to enable a widget based on another widget's state?

Actions & Logic

I'm building a questionnaire feature and the screen is supposed to look something like this:

I'd like for the "Continue" button to be enabled only once one choice is selected from the list of options (RadioButton). However, I can't figure out how to access the selection state of the radio button and update the enable status of the Continue button.

My first attempt:

Create a local component state variable on the RadioButtonComponent called isOptionSelected

And the corresponding action to set the variable bound to the "On Select" of the RadioButton:


The challenge here is that isOptionSelected does not seem to be exposed to the Button widget. That is, there's no "Component State" option (like the "Page State" one) available in the source variable selector for the button's Disable Options:

I looked around further and thought I'd find the variable under the "Widget State" option but expanding it leads to something else that I don't understand much:

which further leads to more confusing options, as in: what does "Access Type" actually mean? I thought the pre-defined component variable should just be available somewhere here...

What am I missing here, and/or how would you implement the desired behavior?

Additional/background info:

The choice list is implemented as a RadioButton wrapped in a component, to avoid this error as discussed here and here:

RadioButton widget with the current configuration will not function properly when generated dynamically at the moment (because it is associated with a local state variable). Consider wrapping it inside of a component and then generate the component dynamically.
What have you tried so far?

[see the first attempt in the main description]

Attempt 2: Page State

From the docs, I gather that it makes more sense to use a Page State variable to track the status of the radio buttons ("Widget 1") and thus dynamically set the 'enabled' state of the Continue button ("Widget 2"), since the two widgets are different. So I created a local page state variable on the scaffold called isAnswerChoiceSelected

The challenge here is that I can't seem to access the correct action (On Select of the radio button). Only the "On Tap" (supposedly of the wrapping component) is available:

With this approach, the radio button selection action is not reaching the Continue button (and it makes sense to me, since the action that we want is On Select of the RadioButton)

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