getIndex property

ValueChanged<int?>? getIndex
final

Called when the user taps on the radio button and it returns the index value you passed in the widget.

The pupose of this function is to help you when there are for example multi-user based radio buttons and you need to know which one clicked. So, for this kind of index based situation you can use it if needed.

Code Example :

WidgetRadioButton(
  title: "Male",
  value: "male",
  index: 1,
  getIndex: (index) {
    print(index);
  },
  onTap: (value) {
    print(value);
  },
 )

Implementation

final ValueChanged<int?>? getIndex;