From 757e907a21921ddedb8e39f567449f2e32fd2751 Mon Sep 17 00:00:00 2001 From: Akshay Nair Date: Tue, 2 Jun 2020 21:11:43 +0530 Subject: Some styling for the time widget --- lib/pages/Home.dart | 28 +++++++++++++++++++++++----- 1 file changed, 23 insertions(+), 5 deletions(-) (limited to 'lib') diff --git a/lib/pages/Home.dart b/lib/pages/Home.dart index d4c8d19..8913fdb 100644 --- a/lib/pages/Home.dart +++ b/lib/pages/Home.dart @@ -20,15 +20,33 @@ class StatusInfoCard extends StatelessWidget { Widget child = Text('Loading...', key: Key('loading')); if (snapshot.hasData) { - child = Column(children: [ - Text(timeFormat.format(snapshot.data), key: Key('time')), - Text(dateFormat.format(snapshot.data), key: Key('date')), - ]); + child = Column( + mainAxisAlignment: MainAxisAlignment.start, + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Text(timeFormat.format(snapshot.data), + key: Key('time'), + textAlign: TextAlign.left, + style: const TextStyle( + fontSize: 32.0, + fontWeight: FontWeight.bold, + ), + ), + Text(dateFormat.format(snapshot.data), + key: Key('date'), + textAlign: TextAlign.left, + style: const TextStyle( + fontSize: 20.0, + ), + ), + ] + ); } return Container( height: 300, - child: child, + padding: EdgeInsets.symmetric(vertical: 8.0), + child: Align(alignment: Alignment.topLeft, child: child), ); }, ); -- cgit v1.3.1