dart else if
void main() {
var num = 2;
if(num > 0) {
print("${num} is positive");
}
else if(num < 0) {
print("${num} is negative");
} else {
print("${num} is neither positive nor negative");
}
}
dart else if
void main() {
var num = 2;
if(num > 0) {
print("${num} is positive");
}
else if(num < 0) {
print("${num} is negative");
} else {
print("${num} is neither positive nor negative");
}
}
conditionalstatement in widget flutter
Container(
color: Colors.white,
child: ('condition')
? Widget1(...)
: Widget2(...)
)
dart if else
void main() {
var num = 12;
if (num % 2==0) {
print("Even");
} else {
print("Odd");
}
}
if then else inside child in flutter
Container(
color: Colors.white,
child: ('condition')
? Widget1(...)
: Widget2(...)
)
Copyright © 2021 Codeinu
Forgot your account's password or having trouble logging into your Account? Don't worry, we'll help you to get back your account. Enter your email address and we'll send you a recovery link to reset your password. If you are experiencing problems resetting your password contact us