From c5a280d91b2752944eaa2c6b749342775ddaf4e7 Mon Sep 17 00:00:00 2001 From: Valentin CZERYBA Date: Wed, 22 Jan 2025 21:49:16 +0100 Subject: [PATCH] add getDouble --- covas_mobile/lib/pages/ListItemMenu.dart | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/covas_mobile/lib/pages/ListItemMenu.dart b/covas_mobile/lib/pages/ListItemMenu.dart index 92bd94c..b4105b8 100644 --- a/covas_mobile/lib/pages/ListItemMenu.dart +++ b/covas_mobile/lib/pages/ListItemMenu.dart @@ -97,7 +97,7 @@ class _MyHomePageState extends State { if (position != null) { // Calculate the boundaries - double radiusInKm = prefs.getDouble("kilometer") ?? 50; + double radiusInKm = prefs.getDouble("kilometer") ?? 50.0; double latDistance = radiusInKm / 111.0; double lonDistance = radiusInKm / (111.0 * cos(position.latitude * pi / 180)); @@ -285,7 +285,7 @@ class _MyHomePageState extends State { final latitude = prefs.getDouble("city_lat") ?? 0.0; final longitude = prefs.getDouble("city_long") ?? 0.0; - final radiusInKm = 50; + final radiusInKm = prefs.getDouble("kilometer") ?? 50.0; String endpoint = "events"; String queryParameters = "";