getOrderValue method
The order priority when visualizing the StatementType in the StatementTypePicker.
Statement types are shown in ascending order based on this priority. See
Implementation
int getOrderValue() {
switch (this) {
/// [StatementBlock] is not a [Statement] which is directly created by the user.
/// Rather, it simply represents a list of statements in the same scope, e.g., the body of a for-loop.
///
/// For that reason, it is assigned an arbitrarily high value which can be ignored.
case StatementType.statementBlockStatement:
return 999;
case StatementType.printStatement:
return 9;
case StatementType.returnStatement:
return 2;
case StatementType.ifElseStatement:
return 8;
case StatementType.forLoopStatement:
return 4;
case StatementType.whileLoopStatement:
return 5;
case StatementType.variableDeclarationStatement:
return 0;
case StatementType.variableAssignmentStatement:
return 1;
case StatementType.customFunctionCallStatement:
return 3;
case StatementType.breakStatement:
return 6;
case StatementType.continueStatement:
return 7;
}
}