add getDouble
This commit is contained in:
parent
280909deb9
commit
c5a280d91b
@ -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 = "";
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user