xxxxxxxxxx
Use an immediate anonymous function
class StatmentExample extends StatelessWidget {
Widget build(BuildContext context) {
return Text((() {
if(true){
return "tis true";}
return "anything but true";
})());
}
}
ie wrap your statements in a function
(() {
// your code here
}())