flutter if else condition in widget code example
Example 1: flutter conditional statement
condition? Text("True"): null,
Example 2: if then else inside child in flutter
Container(
color: Colors.white,
child: ('condition')
? Widget1(...)
: Widget2(...)
)