flutter is it okay to use if code example
Example 1: conditionalstatement in widget flutter
Container(
color: Colors.white,
child: ('condition')
? Widget1(...)
: Widget2(...)
)
Example 2: if then else inside child in flutter
Container(
color: Colors.white,
child: ('condition')
? Widget1(...)
: Widget2(...)
)