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 - 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:

View file

@ -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 = (

View file

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

View file

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