0
  final latitude;
  final longitude;

  MapScreen({this.longitude,this.latitude});

:

  void initState() {
    searchNearby();
    _setCircles(LatLng(widget.latitude, widget.longitude));
    latitude = widget.latitude;
    longitude = widget.longitude;
  }

   static double latitude = 00.00;
   static double longitude = 00.00;

so I am trying to pass lat&long to the map screen and use them on this page but it's only being assigned once, and when I try different lat&long it remains equal to the first lat&long that passed in the first, and without the initstate I can't use them directly.

0 Answers0