From 6e8d5ab4181ac0efd3263fe4fd8812c4ed8da000 Mon Sep 17 00:00:00 2001 From: "dorian.hodin" Date: Mon, 14 Nov 2022 21:27:51 +0100 Subject: [PATCH] Problem resolution --- .idea/libraries/Dart_Packages.xml | 312 +++++++++--------- .idea/libraries/Dart_SDK.xml | 38 +-- .../lib/position/location.dart | 8 +- .../lib/views/pages/main/p_main.dart | 1 - Sources/phpLocation/.idea/workspace.xml | 87 +++++ 5 files changed, 268 insertions(+), 178 deletions(-) create mode 100644 Sources/phpLocation/.idea/workspace.xml diff --git a/.idea/libraries/Dart_Packages.xml b/.idea/libraries/Dart_Packages.xml index c9b52b6..433111f 100644 --- a/.idea/libraries/Dart_Packages.xml +++ b/.idea/libraries/Dart_Packages.xml @@ -5,630 +5,630 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/.idea/libraries/Dart_SDK.xml b/.idea/libraries/Dart_SDK.xml index cb79f3d..3dbed52 100644 --- a/.idea/libraries/Dart_SDK.xml +++ b/.idea/libraries/Dart_SDK.xml @@ -1,25 +1,25 @@ - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + diff --git a/Sources/dafl_project_flutter/lib/position/location.dart b/Sources/dafl_project_flutter/lib/position/location.dart index 762f7fa..1c7761b 100644 --- a/Sources/dafl_project_flutter/lib/position/location.dart +++ b/Sources/dafl_project_flutter/lib/position/location.dart @@ -15,7 +15,7 @@ class Location { if (permission == LocationPermission.denied) { permission = await Geolocator.requestPermission(); if (permission == LocationPermission.deniedForever) { - //faire l'interface graphique pour gérer ça + //faire l'interface gra pour gérer ça return Future.error('Location Not Available'); } } @@ -26,11 +26,15 @@ class Location { "latitude" : current.latitude.toString(), "longitude" : current.longitude.toString(), }); + return getData(); } static Future getData() async { Uri uri = Uri.parse("http://89.83.53.34/phpmyadmin/dafldev/distance.php"); - http.Response response = await http.get(uri); + String actualUser = MyApp().controller.currentUser.usernameDafl; + http.Response response = await http.post(uri, body : { + "id" : actualUser.toString(), + }); var data = jsonDecode(response.body); log(data.toString()); return data.toString(); diff --git a/Sources/dafl_project_flutter/lib/views/pages/main/p_main.dart b/Sources/dafl_project_flutter/lib/views/pages/main/p_main.dart index 7c7fdb4..5ea0cd6 100644 --- a/Sources/dafl_project_flutter/lib/views/pages/main/p_main.dart +++ b/Sources/dafl_project_flutter/lib/views/pages/main/p_main.dart @@ -29,7 +29,6 @@ class _MainPageState extends State { @override Widget build(BuildContext context) { Location.sendCurrentLocation(); - Location.getData(); double height = MediaQuery.of(context).size.height; return Scaffold( resizeToAvoidBottomInset: false, diff --git a/Sources/phpLocation/.idea/workspace.xml b/Sources/phpLocation/.idea/workspace.xml new file mode 100644 index 0000000..5302c39 --- /dev/null +++ b/Sources/phpLocation/.idea/workspace.xml @@ -0,0 +1,87 @@ + + + + + + + + + + + + + + + + + + + + + + + $PROJECT_DIR$/composer.json + + + + + + + + + + + + + + + + + + + + + + + + + 1668370798748 + + + + + + + + + \ No newline at end of file