From 1d324feca73f833154252e7da21f49b7632770dc Mon Sep 17 00:00:00 2001
From: theiled00 <theiled00@zedat.fu-berlin.de>
Date: Sun, 16 Apr 2023 14:15:54 +0200
Subject: [PATCH] Change host for demo. Fix broken weather widget

---
 android/app/src/main/AndroidManifest.xml | 1 +
 lib/main.dart                            | 6 +++---
 2 files changed, 4 insertions(+), 3 deletions(-)

diff --git a/android/app/src/main/AndroidManifest.xml b/android/app/src/main/AndroidManifest.xml
index 905e23f..4e83d19 100644
--- a/android/app/src/main/AndroidManifest.xml
+++ b/android/app/src/main/AndroidManifest.xml
@@ -2,6 +2,7 @@
     package="com.example.router_app">
    <application
         android:label="router_app"
+        android:enableOnBackInvokedCallback="true"
         android:name="${applicationName}"
         android:icon="@mipmap/ic_launcher">
         <activity
diff --git a/lib/main.dart b/lib/main.dart
index 28db3ab..5618c02 100644
--- a/lib/main.dart
+++ b/lib/main.dart
@@ -156,7 +156,7 @@ class _HomePageState extends State<HomePage> {
     if (result != null) {
       //Match adress with Backend
       final response = await http.post(
-          Uri.parse('http://10.0.2.2:8080/addressmatching'),
+          Uri.parse('http://25.35.19.125:8080/addressmatching'),
           body: jsonEncode({"address": result}),
           headers: <String, String>{"Content-Type": "application/json"});
       _data = jsonDecode(response.body);
@@ -203,7 +203,7 @@ class _HomePageState extends State<HomePage> {
     _isLoading = true;
 
     await Future.wait<void>([
-      _getWeather(),
+      //_getWeather(),
       _getDirections(),
     ]);
 
@@ -283,7 +283,7 @@ class _HomePageState extends State<HomePage> {
 
       // Get direction data
       // No weather or days included for now
-      final response = await http.post(Uri.parse('http://10.0.2.2:8080/route'),
+      final response = await http.post(Uri.parse('http://25.35.19.125:8080/route'),
           body: jsonEncode({
             "start_node": {"lat": originlat, "lon": originlon},
             "end_node": {"lat": destlat, "lon": destlon},
-- 
GitLab