it will work inside an widget.
Column(
children: [
if(a > 10)...[
Text("A is greater than 10"),
]else...[
Text("A is less than or Equal to 10")
]
])
Normally:
int time = 6;
if(time > 12) {
time = time - 12;
print('$time PM');
}else {
print('$time AM');
};