Not sure if anyone has run into this yet or not, but I'm attempting to do something like:
@override
Widget build(BuildContext context) {
return Column(
children: [
AWidget(),
SizedBox(height: 10),
AnotherWidget(),
for (final record in records) [
SizedBox(height: 10),
YetAnotherWidget(record),
],
SizedBox(height: 10),
FinalWidget(),
],
);
}
The attempt to return an array in the for loop is making the analyzer angry when it tries to flatten everything. Obviously I can convert to use Padding instead of SizedBox in there and make it a single widget for each list record. Does anyone know a way to return two widgets in a Collection-For statement, though?
-Andrew