So far whenever I needed to use a conditional statement within a Widget I have done the following (Using Center and Containers as simplified dummy examples):
You can use ternary operator for conditional statements in dart, It's use is simple
(condition) ? statement1 : statement2
if the condition is true then the statement1 will be executed otherwise statement2.
Taking a practical example
Center(child: condition ? Widget1() : Widget2())
Remember if you are going to use null as Widget2 it is better to use SizedBox.shrink() because some parent widgets will throw an exception after getting a null child.