Handle Radio value

mail@pastecode.io avatar
unknown
plain_text
2 years ago
300 B
1
Indexable
Never
int selectedServiceIndex = -1;
 int _radioValue = -1;

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