Skip to content

Instantly share code, notes, and snippets.

@crizant
Created February 7, 2020 17:12
Show Gist options
  • Save crizant/260e9e8ef554a61b0cfa8cf030c5a0a7 to your computer and use it in GitHub Desktop.
Save crizant/260e9e8ef554a61b0cfa8cf030c5a0a7 to your computer and use it in GitHub Desktop.
Flutter conditional rendering of list of widgets
class MyWidget extends StatelessWidget {
@override
Widget build(BuildContext context) {
return Column(
children: <Widget>[
if (someCondition == true) ...[
Text('Widget A'),
Text('Widget B'),
Text('Widget C'),
],
],
);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment