From 871706b606c77eeac13bfcea67c3ce1d71203d2c Mon Sep 17 00:00:00 2001 From: Akshay Nair Date: Wed, 3 Jun 2020 14:39:52 +0530 Subject: Adds shared preferences for config/theme storage + refactors a streamstate --- lib/pages/Home.dart | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'lib/pages') diff --git a/lib/pages/Home.dart b/lib/pages/Home.dart index 1f4b473..8efa86e 100644 --- a/lib/pages/Home.dart +++ b/lib/pages/Home.dart @@ -3,6 +3,7 @@ import 'package:flutter/material.dart'; import 'package:intl/intl.dart'; import '../components/FixedContainer.dart'; +import '../data/config.dart'; class StatusInfoCard extends StatelessWidget { Stream time$; @@ -10,7 +11,7 @@ class StatusInfoCard extends StatelessWidget { StatusInfoCard(this.time$, { this.defaultTime }): super(); - final timeFormat = DateFormat('h:m a'); // H fr 24 hrs + final timeFormat = DateFormat('h:mm a'); // H fr 24 hrs final dateFormat = DateFormat('EEEE, d MMM'); @override @@ -42,12 +43,16 @@ class StatusInfoCard extends StatelessWidget { fontWeight: FontWeight.w300, ), ), + FlatButton( + child: Text('Theme'), + onPressed: () { toggleTheme(); } + ), ] ); } return Container( - height: 80, + height: 300, padding: EdgeInsets.symmetric(vertical: 8.0), child: Align(alignment: Alignment.topLeft, child: child), ); -- cgit v1.3.1