X-Git-Url: https://git.cworth.org/git?a=blobdiff_plain;f=flutterfamilies%2Flib%2Fmain.dart;h=7b8c856010cc98060dcac6ab6b0c1d9af545c46f;hb=c7d9729e9c897ffc293ce79dd2f2bd51b3e579c9;hp=f61141c2859c4e56bd10380e3d2ba06a6ab1306b;hpb=d7d546bec9e1d02f31d4efacd56ce565adef6678;p=lmno.games diff --git a/flutterfamilies/lib/main.dart b/flutterfamilies/lib/main.dart index f61141c..7b8c856 100644 --- a/flutterfamilies/lib/main.dart +++ b/flutterfamilies/lib/main.dart @@ -26,7 +26,7 @@ class MyApp extends StatelessWidget { // closer together (more dense) than on mobile platforms. visualDensity: VisualDensity.adaptivePlatformDensity, ), - home: MyHomePage(title: 'Families (Name Game)'), + home: MyHomePage(title: 'Families / Empires'), ); } } @@ -77,35 +77,36 @@ class _MyHomePageState extends State { // the App.build method, and use it to set our appbar title. title: Text(widget.title), ), - 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. - // - // Invoke "debug painting" (press "p" in the console, choose the - // "Toggle Debug Paint" action from the Flutter Inspector in Android - // Studio, or the "Toggle Debug Paint" command in Visual Studio Code) - // to see the wireframe for each widget. - // - // Column has various properties to control how it sizes itself and - // how it positions its children. Here we use mainAxisAlignment to - // center the children vertically; the main axis here is the vertical - // axis because Columns are vertical (the cross axis would be - // horizontal). - mainAxisAlignment: MainAxisAlignment.center, - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - Text( - 'You have pushed the button this many times:', - ), - Text( - '$_counter', - style: Theme.of(context).textTheme.headline4, - ), - ], + body: new Container( + margin: const EdgeInsets.only(left: 20.0, right: 20.0), + child : Center( + child: Column( + mainAxisAlignment: MainAxisAlignment.center, + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Spacer(flex: 10), + Text( + 'Name:', + style: Theme.of(context).textTheme.headline4, + ), + TextField( + decoration: InputDecoration( + hintText: 'Enter your (real) name', + ), + ), + Spacer(), + Text( + 'Character:', + style: Theme.of(context).textTheme.headline4, + ), + TextField( + decoration: InputDecoration( + hintText: 'Enter your family/empire name', + ), + ), + Spacer(flex: 10), + ], + ), ), ), floatingActionButton: FloatingActionButton(