Dart Programming Tutorial on Dart Programming Decision Making

a conditional/decision-making construct evaluates a condition before the instructions are executed.

decision making

conditional constructs in dart are classified in the following table.

sr.no statement & description
1 if statement

an if statement consists of a boolean expression followed by one or more statements.

2 if...else statement

an if can be followed by an optional else block. the else block will execute if the boolean expression tested by the if block evaluates to false.

3 else…if ladder

the else…if ladder is useful to test multiple conditions. following is the syntax of the same.

4 switch…case statement

the switch statement evaluates an expression, matches the expression’s value to a case clause and executes the statements associated with that case.