let the testing begin!

This commit is contained in:
Felix 2019-08-19 11:43:53 +01:00
parent 2e1b74a222
commit ff7cdf4907
4 changed files with 57 additions and 52 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

@ -1,6 +1,6 @@
import 'package:flutter/material.dart';
import 'dart:async';
import 'package:flutter/services.dart';
import 'package:local_spend/common/apifunctions/find_organisations.dart';
class FindOrganisations {
@ -83,6 +83,7 @@ class FindOrganisations {
Future<Organisation> dialog(context) {
bool _searchEnabled = false;
bool _orgsFetched = false;
TextEditingController searchBarText = new TextEditingController();
var organisations = new Organisations();
var listTitle = "All Organisations";
@ -107,62 +108,66 @@ class FindOrganisations {
builder: (context, setState) {
return SimpleDialog(
children: <Widget>[
Padding(
padding: EdgeInsets.fromLTRB(20, 0, 0, 0),
child: Row(
children: [
Container(
width: 140,
height: 50,
child: TextField(
controller: searchBarText,
decoration: InputDecoration(
hintText: "Payee Name",
Column(
children: [
Row(
crossAxisAlignment: CrossAxisAlignment.center,
children: [
Container(
padding: EdgeInsets.fromLTRB(20, 0, 0, 0),
width: 150,
height: 50,
child: TextField(
controller: searchBarText,
decoration: InputDecoration(
hintText: "Payee Name",
),
onChanged: (value) {
if (value.length > 0) {
_searchEnabled = true;
} else {
_searchEnabled = false;
}
setState(() => {_searchEnabled});
},
onSubmitted: _searchEnabled ? (_) {
var result = _submitSearch(searchBarText.text);
result.then((_) {
setState(() {});
});
} : null,
),
onChanged: (value) {
if (value.length > 0) {
_searchEnabled = true;
} else {
_searchEnabled = false;
}
setState(() => {_searchEnabled});
},
onSubmitted: (_) {
if (_searchEnabled) {
var result = _submitSearch(searchBarText.text);
result.then((_) {
setState(() {});
});
}
},
),
),
Container(
width: 80,
padding: EdgeInsets.fromLTRB(20, 0, 0, 0),
Container(
width: 80,
padding: EdgeInsets.fromLTRB(20, 0, 0, 0),
child: RaisedButton(
onPressed: (() {
if (_searchEnabled) {
var result = _submitSearch(searchBarText.text);
result.then((_) {
setState(() {});
});
}
}),
child: RaisedButton(
onPressed: (() {
if (_searchEnabled) {
SystemChannels.textInput.invokeMethod('TextInput.hide');
var result = _submitSearch(searchBarText.text);
result.then((_) {
setState(() {
_orgsFetched = true;
});
});
}
}),
child: Icon(Icons.search, color: Colors.white),
color: _searchEnabled ? Colors.blue : Colors.blue[200],
// make inactive when search in progress as activity indicator
child: Icon(Icons.search, color: Colors.white),
color: _searchEnabled ? Colors.blue : Colors.blue[200],
// make inactive when search in progress as activity indicator
),
),
),
],
),
],
),
],
),
Column(
children: organisationsList.length > 0 ? [
children: _orgsFetched ? [
Container(
padding: EdgeInsets.fromLTRB(20, 20, 20, 0),
child: Text(

View File

@ -147,7 +147,7 @@ class StatsPageState extends State<StatsPage> {
Container(
padding: EdgeInsets.fromLTRB(0.0,17,0.0,0.0),
child : Text(
"Last Month's Spend",
"Last Month's Total Spend",
textAlign: TextAlign.center,
style: TextStyle(
fontSize: 22.0,