Question:I need to pass the index value of 2 radio buttons from a children Stateful widgets to another stateful widget in the same page. Then when value is returned, with
buttonCalculate, i will choose between “multiply” or “divide” operation. I already set the
ifstatement, but i cannot get the value from radio buttons. Radio buttons are custom buttons called from main stateful class as
Code looks like this
Answer:You can pass function callback to
MyStatefulWidgetand call that function with the index value when the radio button is pressed.
If you have better answer, please add a comment about this, thank you!