diff --git a/.gitignore b/.gitignore index 4377732..ed974fc 100644 --- a/.gitignore +++ b/.gitignore @@ -118,8 +118,6 @@ fabric.properties .dart_tool/ .packages .pub/ -# If you're building an application, you may want to check-in your pubspec.lock -pubspec.lock # Directory created by dartdoc # If you don't generate documentation locally you can remove this line. diff --git a/lib/widgets/countdown.dart b/lib/widgets/countdown.dart index 31c56ba..7faa1e9 100644 --- a/lib/widgets/countdown.dart +++ b/lib/widgets/countdown.dart @@ -64,14 +64,66 @@ class _CountdownState extends State with TickerProviderStateMixin { mainAxisAlignment: MainAxisAlignment.spaceAround, crossAxisAlignment: CrossAxisAlignment.end, children: [ - new Text(times["days"].toString(), style: Theme.of(context).textTheme.headline,), - new Text("days", style: Theme.of(context).textTheme.body1,), - new Text(times["hours"].toString(), style: Theme.of(context).textTheme.headline,), - new Text("hours", style: Theme.of(context).textTheme.body1,), - new Text(times["minutes"].toString(), style: Theme.of(context).textTheme.headline,), - new Text("minutes", style: Theme.of(context).textTheme.body1,), - new Text(times["seconds"].toString(), style: Theme.of(context).textTheme.headline,), - new Text("seconds", style: Theme.of(context).textTheme.body1,), + new Flexible( + fit: FlexFit.tight, + child: new Text( + times["days"].toString(), + style: Theme.of(context).textTheme.headline, + textAlign: TextAlign.center, + ), + ), + new Flexible( + fit: FlexFit.loose, + child: new Text( + "days", + style: Theme.of(context).textTheme.body1, + ), + ), + new Flexible( + fit: FlexFit.tight, + child: new Text( + times["hours"].toString(), + style: Theme.of(context).textTheme.headline, + textAlign: TextAlign.center, + ), + ), + new Flexible( + fit: FlexFit.loose, + child: new Text( + "hours", + style: Theme.of(context).textTheme.body1, + ), + ), + new Flexible( + fit: FlexFit.tight, + child: new Text( + times["minutes"].toString(), + style: Theme.of(context).textTheme.headline, + textAlign: TextAlign.center, + ), + ), + new Flexible( + fit: FlexFit.loose, + child: new Text( + "minutes", + style: Theme.of(context).textTheme.body1, + ), + ), + new Flexible( + fit: FlexFit.tight, + child: new Text( + times["seconds"].toString(), + style: Theme.of(context).textTheme.headline, + textAlign: TextAlign.center, + ), + ), + new Flexible( + fit: FlexFit.loose, + child: new Text( + "seconds", + style: Theme.of(context).textTheme.body1, + ), + ), ], ), );