let the testing begin!
This commit is contained in:
parent
2e1b74a222
commit
ff7cdf4907
4 changed files with 57 additions and 52 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 = (
|
||||||
|
|
|
@ -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,12 +108,14 @@ 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(
|
||||||
|
crossAxisAlignment: CrossAxisAlignment.center,
|
||||||
children: [
|
children: [
|
||||||
Container(
|
Container(
|
||||||
width: 140,
|
padding: EdgeInsets.fromLTRB(20, 0, 0, 0),
|
||||||
|
width: 150,
|
||||||
height: 50,
|
height: 50,
|
||||||
child: TextField(
|
child: TextField(
|
||||||
controller: searchBarText,
|
controller: searchBarText,
|
||||||
|
@ -127,14 +130,12 @@ class FindOrganisations {
|
||||||
}
|
}
|
||||||
setState(() => {_searchEnabled});
|
setState(() => {_searchEnabled});
|
||||||
},
|
},
|
||||||
onSubmitted: (_) {
|
onSubmitted: _searchEnabled ? (_) {
|
||||||
if (_searchEnabled) {
|
|
||||||
var result = _submitSearch(searchBarText.text);
|
var result = _submitSearch(searchBarText.text);
|
||||||
result.then((_) {
|
result.then((_) {
|
||||||
setState(() {});
|
setState(() {});
|
||||||
});
|
});
|
||||||
}
|
} : null,
|
||||||
},
|
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
|
||||||
|
@ -145,9 +146,12 @@ class FindOrganisations {
|
||||||
child: RaisedButton(
|
child: RaisedButton(
|
||||||
onPressed: (() {
|
onPressed: (() {
|
||||||
if (_searchEnabled) {
|
if (_searchEnabled) {
|
||||||
|
SystemChannels.textInput.invokeMethod('TextInput.hide');
|
||||||
var result = _submitSearch(searchBarText.text);
|
var result = _submitSearch(searchBarText.text);
|
||||||
result.then((_) {
|
result.then((_) {
|
||||||
setState(() {});
|
setState(() {
|
||||||
|
_orgsFetched = true;
|
||||||
|
});
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}),
|
}),
|
||||||
|
@ -159,10 +163,11 @@ class FindOrganisations {
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
|
],
|
||||||
),
|
),
|
||||||
|
|
||||||
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(
|
||||||
|
|
|
@ -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,
|
||||||
|
|
Reference in a new issue