onTap property

ValueChanged? onTap
final

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

Code Example :

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

Implementation

final ValueChanged<dynamic>? onTap;