Skip to content

Instantly share code, notes, and snippets.

@eriky
Last active October 4, 2019 18:41
Show Gist options
  • Save eriky/64ba680451aea7c92a7024bcb2ec0424 to your computer and use it in GitHub Desktop.
Save eriky/64ba680451aea7c92a7024bcb2ec0424 to your computer and use it in GitHub Desktop.
body: Center(
// Center is a layout widget. It takes a single child and positions it
// in the middle of the parent.
child: Column(
// Column is also a layout widget. It takes a list of children and
// arranges them vertically. By default, it sizes itself to fit its
// children horizontally, and tries to be as tall as its parent.
mainAxisAlignment: MainAxisAlignment.center,
children: [
// Lets create a big fat mouse icon :)
Icon(
Icons.mouse,
color: Colors.grey,
size: 68.0,
),
// And now a nice an clean divider (by default a horizontal line)
Divider(),
// .. our text:
Text(
'You have pushed the button this many times:',
),
// .. and some bigger text for our counter
Text(
// We use the $_counter variable (elsewhere in our code) to
// display the number of click
'$_counter',
),
],
),
),
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment