]> git.cworth.org Git - lmno.games/blobdiff - flutterfamilies/lib/main.dart
Add new Container to allow for margin
[lmno.games] / flutterfamilies / lib / main.dart
index 115e7f0b5ea4bedd25e160c03fad6c8ca6b9d219..1f2d410b324a51215aed2de879314c08815f2a3b 100644 (file)
@@ -9,7 +9,7 @@ class MyApp extends StatelessWidget {
   @override
   Widget build(BuildContext context) {
     return MaterialApp(
-      title: 'Flutter Demo',
+      title: 'Families Game',
       theme: ThemeData(
         // This is the theme of your application.
         //
@@ -26,7 +26,7 @@ class MyApp extends StatelessWidget {
         // closer together (more dense) than on mobile platforms.
         visualDensity: VisualDensity.adaptivePlatformDensity,
       ),
-      home: MyHomePage(title: 'Flutter Demo Home Page'),
+      home: MyHomePage(title: 'Families / Empires'),
     );
   }
 }
@@ -77,7 +77,9 @@ class _MyHomePageState extends State<MyHomePage> {
         // 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(
@@ -98,16 +100,31 @@ class _MyHomePageState extends State<MyHomePage> {
           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',