From 3c1191ec54aa00fcbb485b9ecccaebda03078b0e Mon Sep 17 00:00:00 2001 From: Felix Date: Mon, 19 Aug 2019 09:41:11 +0100 Subject: [PATCH] fixed weird colors on nav bar --- lib/pages/charts/preset_graphs.dart | 4 +- lib/pages/home_page.dart | 1 - lib/pages/new_stats_page.dart | 65 +++++++++++++++++++++++++++++ 3 files changed, 68 insertions(+), 2 deletions(-) create mode 100644 lib/pages/new_stats_page.dart diff --git a/lib/pages/charts/preset_graphs.dart b/lib/pages/charts/preset_graphs.dart index b48885d..f2f1f6d 100644 --- a/lib/pages/charts/preset_graphs.dart +++ b/lib/pages/charts/preset_graphs.dart @@ -24,6 +24,8 @@ class _PresetChartState extends State { @override Widget build(BuildContext context) { - return null; + return new Container( + + ); } } \ No newline at end of file diff --git a/lib/pages/home_page.dart b/lib/pages/home_page.dart index d33119d..37c1970 100644 --- a/lib/pages/home_page.dart +++ b/lib/pages/home_page.dart @@ -1,5 +1,4 @@ import 'package:flutter/material.dart'; -import 'package:local_spend/pages/receipt_page.dart'; import 'package:local_spend/pages/receipt_page_2.dart'; import 'package:local_spend/pages/more_page.dart'; import 'package:local_spend/pages/stats_page.dart'; diff --git a/lib/pages/new_stats_page.dart b/lib/pages/new_stats_page.dart new file mode 100644 index 0000000..75b526d --- /dev/null +++ b/lib/pages/new_stats_page.dart @@ -0,0 +1,65 @@ +import 'package:flutter/material.dart'; +import 'package:local_spend/common/platform/platform_scaffold.dart'; +import 'package:shared_preferences/shared_preferences.dart'; +import 'package:local_spend/common/apifunctions/get_graph_data.dart'; +import 'package:charts_flutter/flutter.dart' as charts; + +const URL = "https://flutter.io/"; +const demonstration = false; + +class NewStatsPage extends StatefulWidget { + @override + State createState() { + return new NewStatsPageState(); + } +} + +class NewStatsPageState extends State { + + /// Graph types: + /// - total_last_week + /// - avg_spend_last_week + /// - total_last_month + /// - avg_spend_last_month + + @override + void initState() { + super.initState(); + _saveCurrentRoute("/StatsPageState"); + } + + @override + void dispose() { + super.dispose(); + } + + _saveCurrentRoute(String lastRoute) async { + SharedPreferences preferences = await SharedPreferences.getInstance(); + await preferences.setString('LastPageRoute', lastRoute); + } + + @override + Widget build(BuildContext context) { + + return PlatformScaffold( + appBar: AppBar( + backgroundColor: Colors.blue[400], + title: Text( + "Statistics", + style: TextStyle( + fontSize: 20, + color: Colors.white, + ), + ), +// leading: BackButton(), + centerTitle: true, + iconTheme: IconThemeData(color: Colors.black), + ), + + + body : Container( + + ), + ); + } +}