diff --git a/ios/Podfile.lock b/ios/Podfile.lock index 8132310..a4e1203 100644 --- a/ios/Podfile.lock +++ b/ios/Podfile.lock @@ -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: diff --git a/ios/Runner.xcodeproj/project.pbxproj b/ios/Runner.xcodeproj/project.pbxproj index a0f8e33..5b4844c 100644 --- a/ios/Runner.xcodeproj/project.pbxproj +++ b/ios/Runner.xcodeproj/project.pbxproj @@ -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 = ( diff --git a/lib/common/widgets/organisations_dialog.dart b/lib/common/widgets/organisations_dialog.dart index 5c69e48..ce65afa 100644 --- a/lib/common/widgets/organisations_dialog.dart +++ b/lib/common/widgets/organisations_dialog.dart @@ -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 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: [ - 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( diff --git a/lib/pages/stats_page.dart b/lib/pages/stats_page.dart index d690003..5e8067f 100644 --- a/lib/pages/stats_page.dart +++ b/lib/pages/stats_page.dart @@ -147,7 +147,7 @@ class StatsPageState extends State { 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,