Check out example codes for "if else dart example". It will help you in understanding the concepts better.

Code Example 1

void main() { 
   var num = 12; 
   if (num % 2==0) { 
      print("Even"); 
   } else { 
      print("Odd"); 
   } 
}

Learn ReactJs, React Native from akashmittal.com