setChecked method Null safety

void setChecked(
  1. bool isChecked
)

Implementation

void setChecked(bool isChecked) {
  setState(() {
    checked = isChecked;
    icon = checked
        ? CupertinoIcons.check_mark_circled_solid
        : CupertinoIcons.circle;
  });
}