Skip to content

Instantly share code, notes, and snippets.

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