buildRecordingCheckbox function
Implementation
Widget buildRecordingCheckbox(Checkbox checkbox, widget) {
return Checkbox(
key: checkbox.key,
value: checkbox.value,
onChanged: (value) async {
debugPrint(
'[SelfTest] Recording checkbox change for "${widget.id}": $value',
);
await SelfTestManager().recordTap(widget.id);
if (checkbox.onChanged != null) {
checkbox.onChanged!(value);
} else {
widget.onTap?.call();
}
},
tristate: checkbox.tristate,
activeColor: checkbox.activeColor,
checkColor: checkbox.checkColor,
fillColor: checkbox.fillColor,
focusColor: checkbox.focusColor,
hoverColor: checkbox.hoverColor,
overlayColor: checkbox.overlayColor,
splashRadius: checkbox.splashRadius,
materialTapTargetSize: checkbox.materialTapTargetSize,
visualDensity: checkbox.visualDensity,
focusNode: checkbox.focusNode,
autofocus: checkbox.autofocus,
shape: checkbox.shape,
side: checkbox.side,
isError: checkbox.isError,
semanticLabel: checkbox.semanticLabel,
);
}