Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR DART

flutter if else

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');
    };
Source by www.fluttercampus.com #
 
PREVIOUS NEXT
Tagged: #flutter
ADD COMMENT
Topic
Name
2+9 =