forgot to stage all the changes...
This commit is contained in:
parent
cb75f1ff87
commit
3060a6d1f9
6 changed files with 65 additions and 53 deletions
|
@ -6,13 +6,13 @@ PODS:
|
|||
- Flutter
|
||||
|
||||
DEPENDENCIES:
|
||||
- Flutter (from `.symlinks/flutter/ios`)
|
||||
- Flutter (from `.symlinks/flutter/ios-profile`)
|
||||
- shared_preferences (from `.symlinks/plugins/shared_preferences/ios`)
|
||||
- url_launcher (from `.symlinks/plugins/url_launcher/ios`)
|
||||
|
||||
EXTERNAL SOURCES:
|
||||
Flutter:
|
||||
:path: ".symlinks/flutter/ios"
|
||||
:path: ".symlinks/flutter/ios-profile"
|
||||
shared_preferences:
|
||||
:path: ".symlinks/plugins/shared_preferences/ios"
|
||||
url_launcher:
|
||||
|
|
|
@ -281,7 +281,7 @@
|
|||
);
|
||||
inputPaths = (
|
||||
"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks.sh",
|
||||
"${PODS_ROOT}/../.symlinks/flutter/ios/Flutter.framework",
|
||||
"${PODS_ROOT}/../.symlinks/flutter/ios-profile/Flutter.framework",
|
||||
);
|
||||
name = "[CP] Embed Pods Frameworks";
|
||||
outputPaths = (
|
||||
|
|
|
@ -7,6 +7,27 @@ import 'package:local_spend/common/functions/save_current_login.dart';
|
|||
import 'package:local_spend/common/functions/show_dialog_single_button.dart';
|
||||
import 'package:local_spend/model/json/login_model.dart';
|
||||
|
||||
Future<void> _incorrectDialog(BuildContext context) async {
|
||||
return showDialog<void>(
|
||||
context: context,
|
||||
barrierDismissible: true,
|
||||
builder: (BuildContext context) {
|
||||
return AlertDialog(
|
||||
title: Text("Unable to Login"),
|
||||
content: Text("Incorrect login details. Please try again."),
|
||||
actions: <Widget>[
|
||||
FlatButton(
|
||||
child: Text('OK'),
|
||||
onPressed: () {
|
||||
Navigator.of(context).pop();
|
||||
},
|
||||
),
|
||||
],
|
||||
);
|
||||
},
|
||||
);
|
||||
}
|
||||
|
||||
Future<LoginModel> requestLoginAPI(
|
||||
BuildContext context, String email, String password) async {
|
||||
//var apiUrl = ConfigWrapper.of(context).apiKey;
|
||||
|
@ -41,11 +62,7 @@ Future<LoginModel> requestLoginAPI(
|
|||
|
||||
saveCurrentLogin(responseJson, body["email"]);
|
||||
|
||||
showDialogSingleButton(
|
||||
context,
|
||||
"Unable to Login",
|
||||
"You may have supplied an invalid 'Email' / 'Password' combination. Please try again or email an administrator.",
|
||||
"OK");
|
||||
_incorrectDialog(context);
|
||||
|
||||
return null;
|
||||
}
|
||||
|
|
|
@ -71,9 +71,9 @@ class FindOrganisations {
|
|||
} else {
|
||||
_searchEnabled = false;
|
||||
}
|
||||
setState(() => {});
|
||||
setState(() => {_searchEnabled});
|
||||
},
|
||||
onSubmitted: (value) {
|
||||
onSubmitted: (_) {
|
||||
if (_searchEnabled) {
|
||||
var result = _submitSearch(searchBarText.text);
|
||||
result.then((_) {
|
||||
|
@ -87,25 +87,22 @@ class FindOrganisations {
|
|||
Container(
|
||||
width: 80,
|
||||
padding: EdgeInsets.fromLTRB(20, 0, 0, 0),
|
||||
child: IgnorePointer(
|
||||
ignoring: _searchEnabled,
|
||||
|
||||
child: RaisedButton(
|
||||
onPressed: () {
|
||||
onPressed: (() {
|
||||
if (_searchEnabled) {
|
||||
var result = _submitSearch(
|
||||
searchBarText.text);
|
||||
var result = _submitSearch(searchBarText.text);
|
||||
result.then((_) {
|
||||
setState(() {});
|
||||
});
|
||||
}
|
||||
},
|
||||
}),
|
||||
|
||||
child: Icon(Icons.search, color: Colors.white),
|
||||
color: _searchEnabled ? Colors.blue : Colors.blue[200],
|
||||
// make inactive when search in progress as activity indicator
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
|
|
|
@ -109,12 +109,13 @@ class LoginPageState extends State<LoginPage> {
|
|||
body: Container(
|
||||
decoration: new BoxDecoration(
|
||||
gradient: new LinearGradient(
|
||||
colors: [Colors.white, Colors.blue[50]],
|
||||
colors: [Colors.blue[50], Colors.white],
|
||||
stops: [0,1],
|
||||
begin: Alignment.topCenter,
|
||||
end: Alignment.bottomCenter,
|
||||
),
|
||||
), child: Container(
|
||||
),
|
||||
child: Container(
|
||||
margin: EdgeInsets.fromLTRB(60,30,60,0),
|
||||
child: Column(
|
||||
children: <Widget>[
|
||||
|
@ -178,19 +179,6 @@ class LoginPageState extends State<LoginPage> {
|
|||
|
||||
child : Material(
|
||||
child: new Container(
|
||||
child : InkWell(
|
||||
onTap: () => login( _emailController.text, _passwordController.text),
|
||||
child: new Container(
|
||||
width: 100,
|
||||
height: 50,
|
||||
child: new Center(
|
||||
child: new Text(
|
||||
'GO', style: new TextStyle(fontSize: 18, color: Colors.white),),
|
||||
),
|
||||
),
|
||||
splashColor: Colors.lightBlueAccent,
|
||||
),
|
||||
|
||||
decoration: new BoxDecoration(
|
||||
border: new Border.all(color : Colors.transparent, width: 2),
|
||||
borderRadius: BorderRadius.all(Radius.circular(2)),
|
||||
|
@ -204,6 +192,24 @@ class LoginPageState extends State<LoginPage> {
|
|||
end: Alignment.bottomRight,
|
||||
),
|
||||
),
|
||||
|
||||
child : Material(
|
||||
type: MaterialType.transparency,
|
||||
|
||||
child : InkWell(
|
||||
onTap: () => login( _emailController.text, _passwordController.text),
|
||||
child: new Container(
|
||||
width: 100,
|
||||
height: 50,
|
||||
child: new Center(
|
||||
child: new Text(
|
||||
'GO', style: new TextStyle(fontSize: 18, color: Colors.white),),
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
|
||||
|
||||
),
|
||||
),
|
||||
),
|
||||
|
|
|
@ -439,14 +439,6 @@ class ReceiptPage2State extends State<ReceiptPage2> {
|
|||
child: RaisedButton(
|
||||
onPressed: () {
|
||||
try {
|
||||
/*
|
||||
DateTime.now(),
|
||||
new TextEditingController(),
|
||||
new Organisation(null, null, null, null, null),
|
||||
"None",
|
||||
false,
|
||||
"Uncategorised",
|
||||
*/
|
||||
if (transaction.amount.text == "" || transaction.organisation.name == null) {
|
||||
showDialog(
|
||||
context: context,
|
||||
|
|
Reference in a new issue