jeudi 23 juin 2022

tristate || value != null': is not true for a list of CheckBoxListTiles

I am facing this error all of a sudden even when I havn't changed any logic in my code. So apparently the list of CheckBoxListTiles is not being built and this error is being thrown to me. I have no idea why it is being thrown since this is my first time facing this error. Thanks in advance for the help. Also I am attaching the Widget below to which the error is pointing to.

Widget checklistOptions1(String title) {
    return CheckboxListTile(
      title: Text(
        title,
        style: Theme.of(context).textTheme.subtitle1,
      ),
      value: values1[title],
      onChanged: (isFalse) {
        setState(() {
          values1[title] = isFalse!;
        });
      },
      activeColor: redAccentColor,
      checkboxShape: RoundedRectangleBorder(
        borderRadius: BorderRadius.circular(4),
      ),
      controlAffinity: ListTileControlAffinity.trailing,
    );
  }

This is the widget to which the error is pointing to and I dont see anything wrong with it although this widget was working perfectly fine a while ago.




Aucun commentaire:

Enregistrer un commentaire