Control flow statements
You can control the flow of your Dart code using any of the following:
if
andelse
for
loopswhile
anddo
-while
loopsbreak
andcontinue
switch
andcase
assert
You can also affect the control flow using try-catch
and throw
, asexplained in Exceptions.