side bar added, ran into weird problem

This commit is contained in:
Felix 2019-07-17 12:54:31 +01:00
parent 4ab078c45e
commit 9e42671488
No known key found for this signature in database
GPG key ID: 130EF6DC43E4DD07
5 changed files with 30 additions and 28 deletions

View file

@ -6,13 +6,13 @@ PODS:
- Flutter
DEPENDENCIES:
- Flutter (from `.symlinks/flutter/ios-profile`)
- Flutter (from `.symlinks/flutter/ios`)
- shared_preferences (from `.symlinks/plugins/shared_preferences/ios`)
- url_launcher (from `.symlinks/plugins/url_launcher/ios`)
EXTERNAL SOURCES:
Flutter:
:path: ".symlinks/flutter/ios-profile"
:path: ".symlinks/flutter/ios"
shared_preferences:
:path: ".symlinks/plugins/shared_preferences/ios"
url_launcher:

View file

@ -281,7 +281,7 @@
);
inputPaths = (
"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks.sh",
"${PODS_ROOT}/../.symlinks/flutter/ios-profile/Flutter.framework",
"${PODS_ROOT}/../.symlinks/flutter/ios/Flutter.framework",
);
name = "[CP] Embed Pods Frameworks";
outputPaths = (

View file

@ -31,7 +31,7 @@ Future<LoginModel> requestLoginAPI(
var user = new LoginModel.fromJson(responseJson);
saveCurrentLogin(responseJson, body["email"]);
Navigator.of(context).pushReplacementNamed('/HomePage');
Navigator.of(context).pushReplacementNamed('/ReceiptPage');
return LoginModel.fromJson(responseJson);
} else {

View file

@ -92,9 +92,9 @@ class LoginPageState extends State<LoginPage> {
onWillPop: () {
if (Navigator.canPop(context)) {
Navigator.of(context).pushNamedAndRemoveUntil(
'/HomePage', (Route<dynamic> route) => false);
'/ReceiptPage', (Route<dynamic> route) => false);
} else {
Navigator.of(context).pushReplacementNamed('/HomePage');
Navigator.of(context).pushReplacementNamed('/ReceiptPage');
}
},
child: PlatformScaffold(

View file

@ -1,4 +1,5 @@
import 'dart:async';
import 'dart:io' show Platform;
import 'package:flutter/material.dart';
import 'package:flutter/services.dart';
@ -143,7 +144,7 @@ class ReceiptPageState extends State<ReceiptPage> {
child: new Text("OK"),
onPressed: () {
Navigator.of(context).pop();
Navigator.of(context).pushReplacementNamed("/HomePage");
Navigator.of(context).pushReplacementNamed("/ReceiptPage");
},
),
],
@ -169,7 +170,7 @@ class ReceiptPageState extends State<ReceiptPage> {
receipt.essential = essential;
submitReceiptAPI(context, receipt);
Navigator.of(context).pushReplacementNamed("/HomePage");
Navigator.of(context).pushReplacementNamed("/ReceiptPage");
}
}
}
@ -300,8 +301,10 @@ class ReceiptPageState extends State<ReceiptPage> {
@override
Widget build(BuildContext context) {
return PlatformScaffold(
drawer: Drawer(),
appBar: AppBar(
automaticallyImplyLeading: !Platform.isIOS, // done to remove UI glitch, now works on both platforms
// leading: Drawer(),
backgroundColor: Colors.blue[400],
title: Text(
"Submit Receipt",
@ -310,9 +313,8 @@ class ReceiptPageState extends State<ReceiptPage> {
color: Colors.white,
),
),
// leading: BackButton(),
centerTitle: true,
iconTheme: IconThemeData(color: Colors.black),
// iconTheme: IconThemeData(color: Colors.black),
),
body: Container(
@ -542,23 +544,23 @@ class ReceiptPageState extends State<ReceiptPage> {
),
),
Container(
padding: const EdgeInsets.fromLTRB(29, 0, 0, 0),
child: DropdownButton<String>(
value: _categoryController.text,
onChanged: (String newValue) {
setState(() {
_categoryController.text = newValue;
});
},
items: _categoryDropDownItems.map<DropdownMenuItem<String>>((String value) {
return DropdownMenuItem<String>(
value: value,
child: Text(value),
);
}).toList(),
)
),
// Container(
// padding: const EdgeInsets.fromLTRB(29, 0, 0, 0),
// child: DropdownButton<String>(
// value: _categoryController.text,
// onChanged: (String newValue) {
// setState(() {
// _categoryController.text = newValue;
// });
// },
// items: _categoryDropDownItems.map<DropdownMenuItem<String>>((String value) {
// return DropdownMenuItem<String>(
// value: value,
// child: Text(value),
// );
// }).toList(),
// )
// ),
],
),
),