Dart uses if
, else if
, and else
to make decisions based on conditions.
&&
, ||
, and !
too.
if
— runs a block of code if the condition is trueelse
— runs a block if the if
failselse if
— tests another condition if previous one fails==
for equality and !=
for inequality