flutter if statement inside children code example
Example: conditionalstatement in widget flutter
Container(
color: Colors.white,
child: ('condition')
? Widget1(...)
: Widget2(...)
)
Container(
color: Colors.white,
child: ('condition')
? Widget1(...)
: Widget2(...)
)