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
+
+
+ 1668370798748
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file