@override
Widget build(BuildContext context) {
return MaterialApp(
- title: 'Flutter Demo',
+ title: 'Families Game',
theme: ThemeData(
// This is the theme of your application.
//
// closer together (more dense) than on mobile platforms.
visualDensity: VisualDensity.adaptivePlatformDensity,
),
- home: MyHomePage(title: 'Flutter Demo Home Page'),
+ home: MyHomePage(title: 'Families / Empires'),
);
}
}
// the App.build method, and use it to set our appbar title.
title: Text(widget.title),
),
- body: Center(
+ body: new Container(
+ margin: const EdgeInsets.only(left: 20.0, right: 20.0),
+ child : Center(
// Center is a layout widget. It takes a single child and positions it
// in the middle of the parent.
child: Column(
mainAxisAlignment: MainAxisAlignment.center,
crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[
+ Spacer(flex: 10),
Text(
- 'You have pushed the button this many times:',
+ 'Name:',
+ style: Theme.of(context).textTheme.headline4,
+ ),
+ TextField(
+ decoration: InputDecoration(
+ hintText: 'Enter your (real) name',
+ ),
),
+ Spacer(),
Text(
- '$_counter',
+ 'Character:',
style: Theme.of(context).textTheme.headline4,
),
+ TextField(
+ decoration: InputDecoration(
+ hintText: 'Enter your family/empire name',
+ ),
+ ),
+ Spacer(flex: 10),
],
),
),
+ ),
floatingActionButton: FloatingActionButton(
onPressed: _incrementCounter,
tooltip: 'Increment',