add getDouble #34

Merged
v4l3n71n merged 1 commits from feature/parameter-kilometer into main 2025-01-22 21:02:51 +00:00
Showing only changes of commit c5a280d91b - Show all commits

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 = "";