fixed bug on display buypoints

This commit is contained in:
Mohamed Nouffer
2023-05-16 20:40:02 +05:30
parent 05a812428a
commit 1769d52601
25 changed files with 108 additions and 85 deletions

View File

@ -11,6 +11,7 @@ class ActionService{
String server_url = ConstValues.currentServer();
String url = "${server_url}/api/makeaction/?user_id=${user_id}&location_id=${location_id}&wanttogo=${wanttogo}&like=${like}&checkin=${checkin}";
//String url = "http://localhost:8100/api/makeaction/?user_id=${user_id}&location_id=${location_id}&wanttogo=${wanttogo}&like=${like}&checkin=${checkin}";
print('++++++++${url}');
print("url is ------ ${url}");
final http.Response response = await http.get(
Uri.parse(url),
@ -30,7 +31,7 @@ class ActionService{
List<dynamic> cats = [];
String server_url = ConstValues.currentServer();
String url = '${server_url}/api/useraction/?user_id=${user_id}&location_id=${location_id}';
print("url is ------ ${url}");
print('++++++++${url}');
//String url = 'http://localhost:8100/api/useraction/?user_id=${user_id}&location_id=${location_id}';
final response = await http.get(Uri.parse(url),
headers: <String, String>{

View File

@ -10,7 +10,7 @@ class AuthService{
Map<String, dynamic> changePassword = {};
String server_url = ConstValues.currentServer();
String url = '${server_url}/api/change-password/';
print('---- toekn is ${token} -----');
print('++++++++${url}');
final http.Response response = await http.put(
Uri.parse(url),
headers: <String, String>{
@ -35,7 +35,7 @@ class AuthService{
Map<String, dynamic> cats = {};
String server_url = ConstValues.currentServer();
String url = '${server_url}/api/login/';
print("------- in logged url ${url} ###### --------");
print('++++++++${url}');
//String url = 'http://localhost:8100/api/login/';
final http.Response response = await http.post(
Uri.parse(url),
@ -59,7 +59,7 @@ class AuthService{
Map<String, dynamic> cats = {};
String server_url = ConstValues.currentServer();
String url = '${server_url}/api/register/';
//String url = 'http://localhost:8100/api/register/';
print('++++++++${url}');
final http.Response response = await http.post(
Uri.parse(url),
headers: <String, String>{
@ -81,7 +81,7 @@ class AuthService{
Map<String, dynamic> cats = {};
String server_url = ConstValues.currentServer();
String url = '${server_url}/api/delete-account/';
//String url = 'http://localhost:8100/api/register/';
print('++++++++${url}');
final http.Response response = await http.get(
Uri.parse(url),
headers: <String, String>{
@ -101,10 +101,7 @@ class AuthService{
List<dynamic> cats = [];
String server_url = ConstValues.currentServer();
String url = '${server_url}/api/userdetials?user_id=${userid}';
//String url = 'http://localhost:8100/api/userdetials?user_id=${userid}';
//String url = 'http://container.intranet.sumasen.net:8100/api/cats/';
print('++++++++${url}');
print("---- UserDetails url is ${url}");
final response = await http.get(Uri.parse(url),
headers: <String, String>{

View File

@ -11,11 +11,7 @@ class CatService{
List<dynamic> cats = [];
String server_url = ConstValues.currentServer();
String url = '${server_url}/api/cats/?ln1=${lon1}&la1=${lat1}&ln2=${lon2}&la2=${lat2}&ln3=${lon3}&la3=${lat3}&ln4=${lon4}&la4=${lat4}';
//String url = 'http://localhost:8100/api/cats/?ln1=${lon1}&la1=${lat1}&ln2=${lon2}&la2=${lat2}&ln3=${lon3}&la3=${lat3}&ln4=${lon4}&la4=${lat4}';
//String url = 'http://container.intranet.sumasen.net:8100/api/cats/';
print("---- loadCats url is ${url}");
print('++++++++${url}');
final response = await http.get(Uri.parse(url),
headers: <String, String>{
'Content-Type': 'application/json; charset=UTF-8',
@ -34,11 +30,7 @@ class CatService{
List<dynamic> cats = [];
String server_url = ConstValues.currentServer();
String url = '${server_url}/api/catbycity/?${cityname}';
//String url = 'http://localhost:8100/api/cats/?ln1=${lon1}&la1=${lat1}&ln2=${lon2}&la2=${lat2}&ln3=${lon3}&la3=${lat3}&ln4=${lon4}&la4=${lat4}';
//String url = 'http://container.intranet.sumasen.net:8100/api/cats/';
print("---- loadCatByCity url is ${url}");
print('++++++++${url}');
final response = await http.get(Uri.parse(url),
headers: <String, String>{
'Content-Type': 'application/json; charset=UTF-8',

View File

@ -15,7 +15,7 @@ class DestinationService{
List<dynamic> cats = [];
String server_url = ConstValues.currentServer();
String url = "${server_url}/api/destinations/?user_id=${user_id}";
//String url = "http://localhost:8100/api/destinations/?user_id=${user_id}";
print('++++++++${url}');
final http.Response response = await http.get(
Uri.parse(url),
headers: <String, String>{
@ -33,7 +33,7 @@ class DestinationService{
Map<String, dynamic> cats = {};
String server_url = ConstValues.currentServer();
String url = "${server_url}/api/delete_destination/?dest_id=${dest_id}";
//String url = "http://localhost:8100/api/delete_destination/?dest_id=${dest_id}";
print('++++++++${url}');
final http.Response response = await http.get(
Uri.parse(url),
headers: <String, String>{
@ -52,8 +52,7 @@ class DestinationService{
int cats = 0;
String server_url = ConstValues.currentServer();
String url = "${server_url}/api/updateorder/?user_action_id=${action_id}&order=${order}&dir=${dir}";
print("---- url is ${url} -----");
//String url = "http://localhost:8100/api/updateorder/?user_action_id=${action_id}&order=${order}&dir=${dir}";
print('++++++++${url}');
final http.Response response = await http.get(
Uri.parse(url),
headers: <String, String>{

View File

@ -57,7 +57,7 @@ class ExternalService {
}
else {
String url = 'https://natnats.mobilous.com/start_from_rogapp';
//print('---- toekn is ${token} -----');
print('++++++++${url}');
final http.Response response = await http.post(
Uri.parse(url),
headers: <String, String>{
@ -82,6 +82,7 @@ class ExternalService {
Future<Map<String, dynamic>> makeCheckpoint(int user_id, String token, String checkin_time, String teamname, int cp, String eventcode, String imageurl) async {
Map<String, dynamic> _res = {};
String url = 'https://natnats.mobilous.com/checkin_from_rogapp';
print('++++++++${url}');
final IndexController indexController = Get.find<IndexController>();
if(imageurl != null){
@ -232,7 +233,7 @@ class ExternalService {
);
String url = 'https://natnats.mobilous.com/goal_from_rogapp';
//print("---response is : ${response.statusCode}----");
print('++++++++${url}');
if (response.statusCode == 201) {
Map<String, dynamic> _res = json.decode(utf8.decode(response.bodyBytes));
print('----_res : ${_res} ----');
@ -264,7 +265,7 @@ class ExternalService {
static Future<Map<String, dynamic>> usersEventCode(String teamcode, String password) async {
Map<String, dynamic> _res = {};
String url = "https://natnats.mobilous.com/check_event_code?zekken_number=${teamcode}&password=${password}";
print("url is ------ ${url}");
print('++++++++${url}');
final http.Response response = await http.get(
Uri.parse(url),
headers: <String, String>{

View File

@ -10,7 +10,7 @@ class LocationLineService{
GeoJsonFeature? fs;
String server_url = ConstValues.currentServer();
String url = '${server_url}/api/location_line/';
//String url = 'http://localhost:8100/api/location_line/';
print('++++++++${url}');
final response = await http.get(Uri.parse(url),
headers: <String, String>{
'Content-Type': 'application/json; charset=UTF-8',

View File

@ -11,7 +11,7 @@ class LocationPolygonervice{
String server_url = ConstValues.currentServer();
String url = '${server_url}/api/location_polygon/';
//String url = 'http://localhost:8100/api/location_polygon/';
print('++++++++${url}');
final response = await http.get(Uri.parse(url),
headers: <String, String>{
'Content-Type': 'application/json; charset=UTF-8',

View File

@ -61,7 +61,7 @@ class LocationService{
url = '${server_url}/api/inperf/?perf=' + perfecture;
}
}
print("----loadLocationsFor url --- ${url}");
print('++++++++${url}');
final response = await http.get(Uri.parse(url),
headers: <String, String>{
'Content-Type': 'application/json; charset=UTF-8',
@ -80,8 +80,7 @@ class LocationService{
List<dynamic> 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;
print('++++++++${url}');
final response = await http.post(Uri.parse(url),
headers: <String, String>{
'Content-Type': 'application/json; charset=UTF-8',
@ -126,7 +125,7 @@ class LocationService{
url = '${server_url}/api/insubperf?subperf=' + subperfecture;
}
}
print("----loadLocationsSubFor url --- ${url}");
print('++++++++${url}');
final response = await http.get(Uri.parse(url),
headers: <String, String>{
'Content-Type': 'application/json; charset=UTF-8',
@ -170,7 +169,7 @@ class LocationService{
url = '${server_url}/api/inbound?ln1=${lon1}&la1=${lat1}&ln2=${lon2}&la2=${lat2}&ln3=${lon3}&la3=${lat3}&ln4=${lon4}&la4=${lat4}';
}
}
print("----loadLocationsBound url --- ${url}");
print('++++++++${url}');
final response = await http.get(Uri.parse(url),
headers: <String, String>{
'Content-Type': 'application/json; charset=UTF-8',
@ -225,7 +224,7 @@ class LocationService{
url = '${server_url}/api/customarea?name=${name}';
}
}
print("----loadCustomLocations url --- ${url}");
print('++++++++${url}');
final response = await http.get(Uri.parse(url),
headers: <String, String>{
'Content-Type': 'application/json; charset=UTF-8',

View File

@ -54,7 +54,7 @@ class MatrixService{
Map<String, dynamic> cats = {};
String url = "https://maps.googleapis.com/maps/api/directions/json?destination=${destination}&mode=${_mode}&waypoints=${locs}&origin=${origin}&key=AIzaSyAUBI1ablMKuJwGj2-kSuEhvYxvB1A-mOE";
print(url);
print('++++++++${url}');
final http.Response response = await http.get(
Uri.parse(url),
headers: <String, String>{

View File

@ -9,7 +9,7 @@ class PerfectureService{
List<dynamic> perfs = [];
String server_url = ConstValues.currentServer();
String url = '${server_url}/api/perf_main/';
//String url = 'http://localhost:8100/api/perf_main/';
print('++++++++${url}');
final response = await http.get(Uri.parse(url),
headers: <String, String>{
'Content-Type': 'application/json; charset=UTF-8',
@ -27,7 +27,7 @@ class PerfectureService{
List<dynamic> perfs = [];
String server_url = ConstValues.currentServer();
String url = '${server_url}/api/subperfinmain/?area=' + area;
//String url = 'http://localhost:8100/api/subperfinmain/?area=' + area;
print('++++++++${url}');
final response = await http.get(Uri.parse(url),
headers: <String, String>{
'Content-Type': 'application/json; charset=UTF-8',
@ -46,7 +46,7 @@ class PerfectureService{
List<dynamic> perfs = [];
String server_url = ConstValues.currentServer();
String url = '${server_url}/api/mainperfext/?perf=' + id;
//String url = 'http://localhost:8100/api/mainperfext/?perf=' + id;
print('++++++++${url}');
final response = await http.get(Uri.parse(url),
headers: <String, String>{
'Content-Type': 'application/json; charset=UTF-8',
@ -64,7 +64,7 @@ class PerfectureService{
List<dynamic> perfs = [];
String server_url = ConstValues.currentServer();
String url = '${server_url}/api/allgifuareas/?perf=' + perf;
//String url = 'http://localhost:8100/api/allgifuareas/?perf=' + perf;
print('++++++++${url}');
final response = await http.get(Uri.parse(url),
headers: <String, String>{
'Content-Type': 'application/json; charset=UTF-8',
@ -82,7 +82,7 @@ class PerfectureService{
List<dynamic> perfs = [];
String server_url = ConstValues.currentServer();
String url = '${server_url}/api/customareanames';
//String url = 'http://localhost:8100/api/customareanames';
print('++++++++${url}');
final response = await http.get(Uri.parse(url),
headers: <String, String>{
'Content-Type': 'application/json; charset=UTF-8',
@ -101,7 +101,7 @@ class PerfectureService{
List<dynamic> perfs = [];
String server_url = ConstValues.currentServer();
String url = '${server_url}/api/perfext/?sub_perf=' + id;
//String url = 'http://localhost:8100/api/perfext/?sub_perf=' + id;
print('++++++++${url}');
final response = await http.get(Uri.parse(url),
headers: <String, String>{
'Content-Type': 'application/json; charset=UTF-8',

View File

@ -12,7 +12,7 @@ class TrackingService {
Map<String, dynamic> cats = {};
String server_url = ConstValues.currentServer();
String url = '${server_url}/api/track/';
//String url = 'http://localhost:8100/api/track/';
print('++++++++${url}');
final geom = '{"type": "MULTIPOINT", "coordinates": [[${lon}, ${lat}]]}';
final http.Response response = await http.post(
Uri.parse(url),