vendredi 10 avril 2020

How to perform if or condition with multiple conditions in Dart

I'm trying to check for many conditions, am doing it like this :

  if (value['start_station'] == startStation.stationName ||
      value['start_station'] == endStation.stationName ||
      value['start_station'] == startStation.stationName ||
      value['start_station'] == endStation.stationName) {

      print("condition met");
  }

if I did

print(value['start_station']);
print(endStation.stationName);

at some point the conditation are met already , but inside the if statment , it is never working.

Aucun commentaire:

Enregistrer un commentaire