From d8ecd50acdf76d3632a9275563ebf11212e07040 Mon Sep 17 00:00:00 2001 From: Felix Date: Wed, 21 Aug 2019 16:59:08 +0100 Subject: [PATCH] progress indicators --- lib/pages/customerGraphs.dart | 24 ++++++++++++++++-------- lib/pages/orgGraphs.dart | 14 ++++++++------ 2 files changed, 24 insertions(+), 14 deletions(-) diff --git a/lib/pages/customerGraphs.dart b/lib/pages/customerGraphs.dart index d020935..efdd7eb 100644 --- a/lib/pages/customerGraphs.dart +++ b/lib/pages/customerGraphs.dart @@ -76,8 +76,10 @@ class _CustomerGraphsState extends State { child: totalLastWeekGraph.graph != null ? new charts.TimeSeriesChart(totalLastWeekGraph.graph) : Center( - child: Text( - "Loading graph...")), //List> + child: CircularProgressIndicator( + valueColor: new AlwaysStoppedAnimation(Colors.orange), + ) + ), //List>es> ), ), Container( @@ -100,8 +102,10 @@ class _CustomerGraphsState extends State { child: avgSpendLastWeekGraph.graph != null ? new charts.TimeSeriesChart(avgSpendLastWeekGraph.graph) : Center( - child: Text( - "Loading graph...")), //List> + child: CircularProgressIndicator( + valueColor: new AlwaysStoppedAnimation(Colors.blue), + ) + ), //List>es> ), ), Container( @@ -124,8 +128,10 @@ class _CustomerGraphsState extends State { child: totalLastMonthGraph.graph != null ? new charts.TimeSeriesChart(totalLastMonthGraph.graph) : Center( - child: Text( - "Loading graph...")), //List> + child: CircularProgressIndicator( + valueColor: new AlwaysStoppedAnimation(Colors.green), + ) + ), //List>es> ), ), Container( @@ -148,8 +154,10 @@ class _CustomerGraphsState extends State { child: avgSpendLastMonth.graph != null ? new charts.TimeSeriesChart(avgSpendLastMonth.graph) : Center( - child: Text( - "Loading graph...")), //List> + child: CircularProgressIndicator( + valueColor: new AlwaysStoppedAnimation(Colors.red), + ) + ), //List>es> ), ), ], diff --git a/lib/pages/orgGraphs.dart b/lib/pages/orgGraphs.dart index 057f68c..82ef593 100644 --- a/lib/pages/orgGraphs.dart +++ b/lib/pages/orgGraphs.dart @@ -114,8 +114,7 @@ class _OrgGraphsState extends State { child: customersLastMonth.graph != null ? new charts.TimeSeriesChart(customersLastMonth.graph) : Center( - child: Text( - "Loading graph...")), //List> + child: CircularProgressIndicator()), //List> ), ), @@ -139,8 +138,9 @@ class _OrgGraphsState extends State { child: salesLastMonth.graph != null ? new charts.TimeSeriesChart(salesLastMonth.graph) : Center( - child: Text( - "Loading graph...")), //List> + child: CircularProgressIndicator( + valueColor: new AlwaysStoppedAnimation(Colors.green), + )), //List> ), ), @@ -164,8 +164,10 @@ class _OrgGraphsState extends State { child: purchasesLastMonth.graph != null ? new charts.TimeSeriesChart(purchasesLastMonth.graph) : Center( - child: Text( - "Loading graph...")), //List> + child: CircularProgressIndicator( + valueColor: new AlwaysStoppedAnimation(Colors.red), + ) + ), //List> ), ),