Skip to content

Instantly share code, notes, and snippets.

@munificent
Created March 14, 2019 22:25
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save munificent/3b9406e2d2340f9e5ed5f19eceacd70c to your computer and use it in GitHub Desktop.
Save munificent/3b9406e2d2340f9e5ed5f19eceacd70c to your computer and use it in GitHub Desktop.
Widget build(BuildContext context) {
var texts = [Text('Hello World')];
if (!isTuesday) {
texts.add(Text('This is Flutter'));
}
texts.add(Text('Written in Dart'));
return MaterialApp(
title: 'Welcome to Flutter',
home: Scaffold(
appBar: AppBar(title: Text('Welcome to Flutter')),
body: Column(children: texts)
)
);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment