Control flow statements

You can control the flow of your Dart code using any of the following:

  • if and else
  • for loops
  • while and do-while loops
  • break and continue
  • switch and case
  • assert

You can also affect the control flow using try-catch and throw, asexplained in Exceptions.