// flight set variable
// note: value should be in "1"
widget.flight=='1'?Text(
// Text(
"Flight",
textAlign: TextAlign.left,
style: TextStyle(
color: Colors.black, fontSize: 15),
):Text(
"",
textAlign: TextAlign.left,
style: TextStyle(
color: Colors.black, fontSize: 15),
),
[…] And if want to know to ternary operator in flutter.If you want more clarity output please click here. […]