NoteHeader: Make it prettier

* Align the header better
* Show the full month name
This commit is contained in:
Vishesh Handa
2019-01-20 13:46:46 +01:00
parent 89d7b724da
commit ccefc3c769

View File

@ -10,7 +10,7 @@ class NoteHeader extends StatelessWidget {
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
var dateStr = DateFormat('MMM, yyyy').format(note.created); var dateStr = DateFormat('MMMM, yyyy').format(note.created);
var timeStr = DateFormat('EEEE HH:mm').format(note.created); var timeStr = DateFormat('EEEE HH:mm').format(note.created);
var bigNum = new Text( var bigNum = new Text(
@ -31,21 +31,20 @@ class NoteHeader extends StatelessWidget {
var w = new Row( var w = new Row(
children: <Widget>[ children: <Widget>[
bigNum, bigNum,
new Padding( SizedBox(width: 8.0),
padding: const EdgeInsets.only(left: 8.0), Column(
child: new Column( children: <Widget>[
children: <Widget>[ dateText,
dateText, timeText,
timeText, ],
], crossAxisAlignment: CrossAxisAlignment.start,
crossAxisAlignment: CrossAxisAlignment.start,
),
), ),
], ],
crossAxisAlignment: CrossAxisAlignment.start,
); );
return new Padding( return new Padding(
padding: new EdgeInsets.only(top: 6.0, bottom: 6.0 * 3), padding: new EdgeInsets.only(top: 8.0, bottom: 18.0),
child: w, child: w,
); );
} }