buildRecordingRadio function
Widget
buildRecordingRadio(
- Radio radio,
- dynamic widget
)
Implementation
Widget buildRecordingRadio(Radio radio, widget) {
return Radio(
key: radio.key,
value: radio.value,
groupValue: radio.groupValue,
onChanged: (value) async {
debugPrint(
'[SelfTest] Recording radio change for "${widget.id}": $value',
);
await SelfTestManager().recordTap(widget.id);
if (radio.onChanged != null) {
radio.onChanged!(value);
} else {
widget.onTap?.call();
}
},
activeColor: radio.activeColor,
fillColor: radio.fillColor,
focusColor: radio.focusColor,
hoverColor: radio.hoverColor,
overlayColor: radio.overlayColor,
splashRadius: radio.splashRadius,
materialTapTargetSize: radio.materialTapTargetSize,
visualDensity: radio.visualDensity,
focusNode: radio.focusNode,
autofocus: radio.autofocus,
toggleable: radio.toggleable,
);
}