Home > Software design >  why is the If statement is not working even if the condition is true? dart & flutter
why is the If statement is not working even if the condition is true? dart & flutter

Time:01-08

why is the If (isNormal == true) statement is not working even if the condition is true

the code that I tried to do are as below

  _checkResult() {
    bool isNormal = false;
    isNormal = userAnswer.every((item) => normalList.contains(item));
    if (isNormal) {
      print("Normal");
    } else {
      print("Try Again");
    }
  }

I already tried to print both lists to check if both data are the same or not,

enter image description here

  • Related