diff --git a/lib/main.dart b/lib/main.dart index fe77db1..61fff8d 100644 --- a/lib/main.dart +++ b/lib/main.dart @@ -2,6 +2,7 @@ import 'package:flutter/material.dart'; import 'package:local_spend/pages/home_page.dart'; import 'package:local_spend/pages/login_page.dart'; import 'package:local_spend/pages/receipt_page.dart'; +import 'package:local_spend/pages/receipt_page_2.dart'; import 'package:local_spend/pages/spash_screen.dart'; import 'package:local_spend/pages/more_page.dart'; import 'package:flutter_localizations/flutter_localizations.dart'; @@ -36,7 +37,7 @@ class MyApp extends StatelessWidget { routes: { "/HomePage": (BuildContext context) => HomePage(), "/LoginPage": (BuildContext context) => LoginPage(), - "/ReceiptPage": (BuildContext context) => ReceiptPage(), + "/ReceiptPage": (BuildContext context) => ReceiptPage2(), "/MorePage": (BuildContext context) => MorePage(), }, home: SplashScreen(), diff --git a/lib/pages/home_page.dart b/lib/pages/home_page.dart index bad8709..d33119d 100644 --- a/lib/pages/home_page.dart +++ b/lib/pages/home_page.dart @@ -1,5 +1,6 @@ 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'; @@ -27,7 +28,7 @@ class _HomePageState extends State { static const TextStyle optionStyle = TextStyle(fontSize: 30, fontWeight: FontWeight.bold); static List _widgetOptions = [ - ReceiptPage(), + ReceiptPage2(), StatsPage(), MorePage() ]; diff --git a/lib/pages/receipt_page.dart b/lib/pages/receipt_page.dart index 27bcad0..603791c 100644 --- a/lib/pages/receipt_page.dart +++ b/lib/pages/receipt_page.dart @@ -1,3 +1,4 @@ +/* import 'dart:async'; import 'package:flutter/material.dart'; @@ -112,7 +113,7 @@ class ReceiptPageState extends State { }); }); } - + Future getCategoriesDropDownMenu(String type) async { List dropDownItems = await getDropDownItems(type); @@ -268,18 +269,16 @@ class ReceiptPageState extends State { // } List getRecurringOptions() { -// var options = new List(7); -// options[0] = "None"; // this should not be hardcoded and should be fetched from API instead -// options[1] = "Daily"; -// options[2] = "Weekly"; -// options[3] = "Fortnightly"; -// options[4] = "Monthly"; -// options[5] = "Quarterly"; -// options[6] = "Yearly"; -// -// return options; + var options = new List(7); + options[0] = "None"; // this should not be hardcoded and should be fetched from API instead + options[1] = "Daily"; + options[2] = "Weekly"; + options[3] = "Fortnightly"; + options[4] = "Monthly"; + options[5] = "Quarterly"; + options[6] = "Yearly"; - var options = + return options; } String formatDate(String date) { @@ -698,3 +697,5 @@ class ReceiptPageState extends State { ); } } + +*/ \ No newline at end of file diff --git a/lib/pages/receipt_page_2.dart b/lib/pages/receipt_page_2.dart new file mode 100644 index 0000000..979213e --- /dev/null +++ b/lib/pages/receipt_page_2.dart @@ -0,0 +1,29 @@ +import 'package:flutter/material.dart'; +import 'package:local_spend/common/platform/platform_scaffold.dart'; + +class ReceiptPage2 extends StatefulWidget { + @override + State createState() { + return new ReceiptPage2State(); + } +} + +class ReceiptPage2State extends State { + @override + Widget build(BuildContext context) { + return PlatformScaffold( + appBar: AppBar( + backgroundColor: Colors.blue[400], + title: Text( + "Submit Receipt", + style: TextStyle( + fontSize: 20, + color: Colors.white, + ), + ), + centerTitle: true, + iconTheme: IconThemeData(color: Colors.black), + ), + ); + } +} \ No newline at end of file