add getDouble

This commit is contained in:
Valentin CZERYBA 2025-01-22 21:49:16 +01:00
parent 280909deb9
commit c5a280d91b

View File

@ -97,7 +97,7 @@ class _MyHomePageState extends State<ListItemMenu> {
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<ListItemMenu> {
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 = "";