This is my code:
Row(
children: [
if (this._check.type == CheckType.SOME)((){
var a = "aaa";
var b = "bbb"
return Text(a + b);
}()),
]
)
This code works and does what I need, however, I would like to simplify it. I tried:
Row(
children: [
if (this._check.type == CheckType.SOME) {
var a = "aaa";
var b = "bbb"
return Text(a + b);
},
]
)
but it doesn't work. Is there any syntax construction to simplify if condition with code in Widget?
if (this._check.type == CheckType.SOME) Text("aaabbb")of course. But I'm assuming you are simplifying the actual problem or not?