Compare commits

..

2 Commits

Author SHA1 Message Date
39c60632f1 Merge pull request 'add getDouble' (#34) from feature/parameter-kilometer into main
Reviewed-on: #34
2025-01-22 21:02:45 +00:00
c5a280d91b add getDouble 2025-01-22 21:49:16 +01:00

View File

@ -97,7 +97,7 @@ class _MyHomePageState extends State<ListItemMenu> {
if (position != null) { if (position != null) {
// Calculate the boundaries // Calculate the boundaries
double radiusInKm = prefs.getDouble("kilometer") ?? 50; double radiusInKm = prefs.getDouble("kilometer") ?? 50.0;
double latDistance = radiusInKm / 111.0; double latDistance = radiusInKm / 111.0;
double lonDistance = double lonDistance =
radiusInKm / (111.0 * cos(position.latitude * pi / 180)); radiusInKm / (111.0 * cos(position.latitude * pi / 180));
@ -285,7 +285,7 @@ class _MyHomePageState extends State<ListItemMenu> {
final latitude = prefs.getDouble("city_lat") ?? 0.0; final latitude = prefs.getDouble("city_lat") ?? 0.0;
final longitude = prefs.getDouble("city_long") ?? 0.0; final longitude = prefs.getDouble("city_long") ?? 0.0;
final radiusInKm = 50; final radiusInKm = prefs.getDouble("kilometer") ?? 50.0;
String endpoint = "events"; String endpoint = "events";
String queryParameters = ""; String queryParameters = "";