I did the Write Your First Flutter App, part 2 tutorial.
Let's consider this code, extracted from the application of the tutorial.
return Scaffold(
appBar: AppBar(
title: Text('Saved Words'),
),
body: ListView(children: divided),
);
Why can't I write something like this:
return Scaffold(
appBar: AppBar(
title: Text('Saved Words'),
),
body: () { if (true) {
ListView(children: divided);
}
},
);
Can't I put an If statement while I am defining a Widget property?