From 9a091543323673b50c6598fea559599d644b9dd9 Mon Sep 17 00:00:00 2001 From: Felix Date: Thu, 18 Jul 2019 14:28:34 +0100 Subject: [PATCH] save before checking-out previous --- lib/common/apifunctions/get_graph_data.dart | 2 +- lib/pages/receipt_page.dart | 35 +++++++++++---------- lib/pages/spash_screen.dart | 2 +- lib/pages/stats_page.dart | 4 +-- 4 files changed, 22 insertions(+), 21 deletions(-) diff --git a/lib/common/apifunctions/get_graph_data.dart b/lib/common/apifunctions/get_graph_data.dart index 995ecfe..7729701 100644 --- a/lib/common/apifunctions/get_graph_data.dart +++ b/lib/common/apifunctions/get_graph_data.dart @@ -17,7 +17,7 @@ class GraphData { /// HTTP POST request sample: /// {"graph":"total_last_week","session_key":"blahblahblah"} - charts.Series dataSeries = new charts.Series(); + charts.Series dataSeries = new charts.Series(); final url = "https://dev.peartrade.org/api/v1/customer/graphs"; SharedPreferences preferences = await SharedPreferences.getInstance(); diff --git a/lib/pages/receipt_page.dart b/lib/pages/receipt_page.dart index d7ffa40..03f5476 100644 --- a/lib/pages/receipt_page.dart +++ b/lib/pages/receipt_page.dart @@ -542,23 +542,24 @@ class ReceiptPageState extends State { ), ), - Container( - padding: const EdgeInsets.fromLTRB(29, 0, 0, 0), - child: DropdownButton( - value: _categoryController.text, - onChanged: (String newValue) { - setState(() { - _categoryController.text = newValue; - }); - }, - items: _categoryDropDownItems.map>((String value) { - return DropdownMenuItem( - value: value, - child: Text(value), - ); - }).toList(), // fix errors here by [items] being an empty container while _categoryDropDownItems is null - ) - ), +// Container( +// padding: const EdgeInsets.fromLTRB(29, 0, 0, 0), +// child: DropdownButton( +// value: _categoryController.text, +// onChanged: (String newValue) { +// setState(() { +// _categoryController.text = newValue; +// }); +// }, +// items: _categoryDropDownItems.map>((String value) { +// return DropdownMenuItem( +// value: value, +// child: Text(value), +// ); +// }).toList(), // fix errors here by [items] being an empty container while _categoryDropDownItems is null +// ) +// ), + ], ), ), diff --git a/lib/pages/spash_screen.dart b/lib/pages/spash_screen.dart index 4aa22ab..acb4449 100644 --- a/lib/pages/spash_screen.dart +++ b/lib/pages/spash_screen.dart @@ -10,7 +10,7 @@ class SplashScreen extends StatefulWidget { } class _SplashScreenState extends State { - final int splashDuration = 3; + final int splashDuration = 1; startTime() async { return Timer(Duration(seconds: splashDuration), () { diff --git a/lib/pages/stats_page.dart b/lib/pages/stats_page.dart index 5e94df9..157507f 100644 --- a/lib/pages/stats_page.dart +++ b/lib/pages/stats_page.dart @@ -49,14 +49,14 @@ class StatsPageState extends State { @override Widget build(BuildContext context) { - if (graphData.data != null) { +// if (graphData.data != null) { graphData.getGraphData('total_last_week').then((val) { totalLastWeek = val; setState(() { // update view }); }); - } +// } return PlatformScaffold( appBar: AppBar(