visitIf method
Implementation
@override
void visitIf(IfStmt node) {
node.subAccept(this);
if (node.condition.isConstValue && node.condition.value is bool) {
bool condition = node.condition.value;
if (condition) {
node.value = node.thenBranch.value;
} else {
node.value = node.elseBranch?.value;
}
}
}