Skip to content

Instantly share code, notes, and snippets.

@crizant
Created February 7, 2020 17:20
Show Gist options
  • Save crizant/74f0afff5720e02216d3f8fcecba7e6d to your computer and use it in GitHub Desktop.
Save crizant/74f0afff5720e02216d3f8fcecba7e6d to your computer and use it in GitHub Desktop.
Flutter tertiary conditional rendering
class MyWidget extends StatelessWidget {
@override
Widget build(BuildContext context) {
return Column(
children: <Widget>[
someCondition == true ?
Text('The condition is true!'):
Text('The condition is false!'),
],
);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment