The rebuild has begun!

This commit is contained in:
Felix 2019-08-05 09:33:39 +01:00
parent 755893ee10
commit 5adb7ae902
4 changed files with 46 additions and 14 deletions

View file

@ -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: <String, WidgetBuilder>{
"/HomePage": (BuildContext context) => HomePage(),
"/LoginPage": (BuildContext context) => LoginPage(),
"/ReceiptPage": (BuildContext context) => ReceiptPage(),
"/ReceiptPage": (BuildContext context) => ReceiptPage2(),
"/MorePage": (BuildContext context) => MorePage(),
},
home: SplashScreen(),

View file

@ -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<HomePageWidget> {
static const TextStyle optionStyle =
TextStyle(fontSize: 30, fontWeight: FontWeight.bold);
static List<Widget> _widgetOptions = <Widget>[
ReceiptPage(),
ReceiptPage2(),
StatsPage(),
MorePage()
];

View file

@ -1,3 +1,4 @@
/*
import 'dart:async';
import 'package:flutter/material.dart';
@ -112,7 +113,7 @@ class ReceiptPageState extends State<ReceiptPage> {
});
});
}
Future<DropdownButton> getCategoriesDropDownMenu(String type) async {
List<DropdownMenuItem> dropDownItems = await getDropDownItems(type);
@ -268,18 +269,16 @@ class ReceiptPageState extends State<ReceiptPage> {
// }
List<String> getRecurringOptions() {
// var options = new List<String>(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<String>(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<ReceiptPage> {
);
}
}
*/

View file

@ -0,0 +1,29 @@
import 'package:flutter/material.dart';
import 'package:local_spend/common/platform/platform_scaffold.dart';
class ReceiptPage2 extends StatefulWidget {
@override
State<StatefulWidget> createState() {
return new ReceiptPage2State();
}
}
class ReceiptPage2State extends State<ReceiptPage2> {
@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),
),
);
}
}