side bar added, ran into weird problem
This commit is contained in:
parent
4ab078c45e
commit
9e42671488
5 changed files with 30 additions and 28 deletions
|
@ -6,13 +6,13 @@ PODS:
|
||||||
- Flutter
|
- Flutter
|
||||||
|
|
||||||
DEPENDENCIES:
|
DEPENDENCIES:
|
||||||
- Flutter (from `.symlinks/flutter/ios-profile`)
|
- Flutter (from `.symlinks/flutter/ios`)
|
||||||
- shared_preferences (from `.symlinks/plugins/shared_preferences/ios`)
|
- shared_preferences (from `.symlinks/plugins/shared_preferences/ios`)
|
||||||
- url_launcher (from `.symlinks/plugins/url_launcher/ios`)
|
- url_launcher (from `.symlinks/plugins/url_launcher/ios`)
|
||||||
|
|
||||||
EXTERNAL SOURCES:
|
EXTERNAL SOURCES:
|
||||||
Flutter:
|
Flutter:
|
||||||
:path: ".symlinks/flutter/ios-profile"
|
:path: ".symlinks/flutter/ios"
|
||||||
shared_preferences:
|
shared_preferences:
|
||||||
:path: ".symlinks/plugins/shared_preferences/ios"
|
:path: ".symlinks/plugins/shared_preferences/ios"
|
||||||
url_launcher:
|
url_launcher:
|
||||||
|
|
|
@ -281,7 +281,7 @@
|
||||||
);
|
);
|
||||||
inputPaths = (
|
inputPaths = (
|
||||||
"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks.sh",
|
"${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";
|
name = "[CP] Embed Pods Frameworks";
|
||||||
outputPaths = (
|
outputPaths = (
|
||||||
|
|
|
@ -31,7 +31,7 @@ Future<LoginModel> requestLoginAPI(
|
||||||
var user = new LoginModel.fromJson(responseJson);
|
var user = new LoginModel.fromJson(responseJson);
|
||||||
|
|
||||||
saveCurrentLogin(responseJson, body["email"]);
|
saveCurrentLogin(responseJson, body["email"]);
|
||||||
Navigator.of(context).pushReplacementNamed('/HomePage');
|
Navigator.of(context).pushReplacementNamed('/ReceiptPage');
|
||||||
|
|
||||||
return LoginModel.fromJson(responseJson);
|
return LoginModel.fromJson(responseJson);
|
||||||
} else {
|
} else {
|
||||||
|
|
|
@ -92,9 +92,9 @@ class LoginPageState extends State<LoginPage> {
|
||||||
onWillPop: () {
|
onWillPop: () {
|
||||||
if (Navigator.canPop(context)) {
|
if (Navigator.canPop(context)) {
|
||||||
Navigator.of(context).pushNamedAndRemoveUntil(
|
Navigator.of(context).pushNamedAndRemoveUntil(
|
||||||
'/HomePage', (Route<dynamic> route) => false);
|
'/ReceiptPage', (Route<dynamic> route) => false);
|
||||||
} else {
|
} else {
|
||||||
Navigator.of(context).pushReplacementNamed('/HomePage');
|
Navigator.of(context).pushReplacementNamed('/ReceiptPage');
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
child: PlatformScaffold(
|
child: PlatformScaffold(
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
import 'dart:async';
|
import 'dart:async';
|
||||||
|
import 'dart:io' show Platform;
|
||||||
|
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:flutter/services.dart';
|
import 'package:flutter/services.dart';
|
||||||
|
@ -143,7 +144,7 @@ class ReceiptPageState extends State<ReceiptPage> {
|
||||||
child: new Text("OK"),
|
child: new Text("OK"),
|
||||||
onPressed: () {
|
onPressed: () {
|
||||||
Navigator.of(context).pop();
|
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;
|
receipt.essential = essential;
|
||||||
|
|
||||||
submitReceiptAPI(context, receipt);
|
submitReceiptAPI(context, receipt);
|
||||||
Navigator.of(context).pushReplacementNamed("/HomePage");
|
Navigator.of(context).pushReplacementNamed("/ReceiptPage");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -300,8 +301,10 @@ class ReceiptPageState extends State<ReceiptPage> {
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
return PlatformScaffold(
|
return PlatformScaffold(
|
||||||
|
drawer: Drawer(),
|
||||||
appBar: AppBar(
|
appBar: AppBar(
|
||||||
|
automaticallyImplyLeading: !Platform.isIOS, // done to remove UI glitch, now works on both platforms
|
||||||
|
// leading: Drawer(),
|
||||||
backgroundColor: Colors.blue[400],
|
backgroundColor: Colors.blue[400],
|
||||||
title: Text(
|
title: Text(
|
||||||
"Submit Receipt",
|
"Submit Receipt",
|
||||||
|
@ -310,9 +313,8 @@ class ReceiptPageState extends State<ReceiptPage> {
|
||||||
color: Colors.white,
|
color: Colors.white,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
// leading: BackButton(),
|
|
||||||
centerTitle: true,
|
centerTitle: true,
|
||||||
iconTheme: IconThemeData(color: Colors.black),
|
// iconTheme: IconThemeData(color: Colors.black),
|
||||||
),
|
),
|
||||||
|
|
||||||
body: Container(
|
body: Container(
|
||||||
|
@ -542,23 +544,23 @@ class ReceiptPageState extends State<ReceiptPage> {
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
|
||||||
Container(
|
// Container(
|
||||||
padding: const EdgeInsets.fromLTRB(29, 0, 0, 0),
|
// padding: const EdgeInsets.fromLTRB(29, 0, 0, 0),
|
||||||
child: DropdownButton<String>(
|
// child: DropdownButton<String>(
|
||||||
value: _categoryController.text,
|
// value: _categoryController.text,
|
||||||
onChanged: (String newValue) {
|
// onChanged: (String newValue) {
|
||||||
setState(() {
|
// setState(() {
|
||||||
_categoryController.text = newValue;
|
// _categoryController.text = newValue;
|
||||||
});
|
// });
|
||||||
},
|
// },
|
||||||
items: _categoryDropDownItems.map<DropdownMenuItem<String>>((String value) {
|
// items: _categoryDropDownItems.map<DropdownMenuItem<String>>((String value) {
|
||||||
return DropdownMenuItem<String>(
|
// return DropdownMenuItem<String>(
|
||||||
value: value,
|
// value: value,
|
||||||
child: Text(value),
|
// child: Text(value),
|
||||||
);
|
// );
|
||||||
}).toList(),
|
// }).toList(),
|
||||||
)
|
// )
|
||||||
),
|
// ),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
|
Reference in a new issue