Handle Radio value

Anonymous
plain_text
11/09/2021 7:01 AM
400 B
19
Indexable
int selectedServiceIndex = -1;
 int _radioValue = -1;

  void _handleRadioValueChange(int value) {
    setState(() {
      _radioValue = value;
      selectedServiceIndex = _radioValue;
      servicePrice = dataServices[_radioValue].charge;
      serviceId = dataServices[_radioValue].id;
    });
  }
Editor is loading...