From adf8d59777f5ec05bd070f937a5a0440bf62328c Mon Sep 17 00:00:00 2001 From: Mohamed Nouffer Date: Fri, 20 Jan 2023 17:21:54 +0530 Subject: [PATCH] update for filter location --- lib/services/location_service.dart | 17 +++++++++-------- pubspec.yaml | 2 +- 2 files changed, 10 insertions(+), 9 deletions(-) diff --git a/lib/services/location_service.dart b/lib/services/location_service.dart index 1145b04..bff48db 100644 --- a/lib/services/location_service.dart +++ b/lib/services/location_service.dart @@ -43,7 +43,7 @@ class LocationService{ if(indexController.currentUser.isNotEmpty){ bool _rog = indexController.currentUser[0]['user']['is_rogaining']; String r = _rog == true ? 'True': 'False'; - var grp = indexController.currentUser[0]['user']['group']; + var grp = indexController.currentUser[0]['user']['event_code']; url = '${server_url}/api/inperf/?rog=${r}&perf=' + perfecture + '&cat=' + cat; } else { @@ -54,7 +54,7 @@ class LocationService{ if(indexController.currentUser.isNotEmpty){ bool _rog = indexController.currentUser[0]['user']['is_rogaining']; String r = _rog == true ? 'True': 'False'; - var grp = indexController.currentUser[0]['user']['group']; + var grp = indexController.currentUser[0]['user']['event_code']; url = '${server_url}/api/inperf/?rog=${r}&perf=' + perfecture; } else { @@ -80,6 +80,7 @@ class LocationService{ List ext = []; String server_url = ConstValues.currentServer(); String url = '${server_url}/api/locsext/'; + print("url is ${url}"); //String url = 'http://localhost:8100/api/perfext/?sub_perf=' + id; final response = await http.post(Uri.parse(url), headers: { @@ -107,7 +108,7 @@ class LocationService{ if(indexController.currentUser.isNotEmpty){ bool _rog = indexController.currentUser[0]['user']['is_rogaining']; String r = _rog == true ? 'True': 'False'; - var grp = indexController.currentUser[0]['user']['group']; + var grp = indexController.currentUser[0]['user']['event_code']; url = '${server_url}/api/insubperf?rog=${r}&subperf=' + subperfecture + '&cat=' + cat; } else{ @@ -118,7 +119,7 @@ class LocationService{ if(indexController.currentUser.isNotEmpty){ bool _rog = indexController.currentUser[0]['user']['is_rogaining']; String r = _rog == true ? 'True': 'False'; - var grp = indexController.currentUser[0]['user']['group']; + var grp = indexController.currentUser[0]['user']['event_code']; url = '${server_url}/api/insubperf?rog=${r}&subperf=' + subperfecture; } else{ @@ -150,7 +151,7 @@ class LocationService{ if(indexController.currentUser.isNotEmpty){ bool _rog = indexController.currentUser[0]['user']['is_rogaining']; String r = _rog == true ? 'True': 'False'; - var grp = indexController.currentUser[0]['user']['group']; + var grp = indexController.currentUser[0]['user']['event_code']; url = '${server_url}/api/inbound?rog=${r}&ln1=${lon1}&la1=${lat1}&ln2=${lon2}&la2=${lat2}&ln3=${lon3}&la3=${lat3}&ln4=${lon4}&la4=${lat4}' + '&cat=' + cat; } else{ @@ -161,7 +162,7 @@ class LocationService{ if(indexController.currentUser.isNotEmpty){ bool _rog = indexController.currentUser[0]['user']['is_rogaining']; String r = _rog == true ? 'True': 'False'; - var grp = indexController.currentUser[0]['user']['group']; + var grp = indexController.currentUser[0]['user']['event_code']; print("-------- requested user group ${grp} -------------"); url = '${server_url}/api/inbound?rog=${r}&ln1=${lon1}&la1=${lat1}&ln2=${lon2}&la2=${lat2}&ln3=${lon3}&la3=${lat3}&ln4=${lon4}&la4=${lat4}'; } @@ -206,7 +207,7 @@ class LocationService{ if(indexController.currentUser.isNotEmpty){ bool _rog = indexController.currentUser[0]['user']['is_rogaining']; String r = _rog == true ? 'True': 'False'; - var grp = indexController.currentUser[0]['user']['group']; + var grp = indexController.currentUser[0]['user']['event_code']; url = '${server_url}/api/custom_area/?rog=${r}&&cat=' + cat; } else{ @@ -217,7 +218,7 @@ class LocationService{ if(indexController.currentUser.isNotEmpty){ bool _rog = indexController.currentUser[0]['user']['is_rogaining']; String r = _rog == true ? 'True': 'False'; - var grp = indexController.currentUser[0]['user']['group']; + var grp = indexController.currentUser[0]['user']['event_code']; url = '${server_url}/api/customarea?rog=${r}&name=${name}'; } else{ diff --git a/pubspec.yaml b/pubspec.yaml index f6db799..087c8f4 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -15,7 +15,7 @@ publish_to: 'none' # Remove this line if you wish to publish to pub.dev # In iOS, build-name is used as CFBundleShortVersionString while build-number used as CFBundleVersion. # Read more about iOS versioning at # https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html -version: 1.0.3+3 +version: 1.0.4+4 environment: sdk: ">=2.16.0 <3.0.0"