Im new and my question may be stupid but
in class Location i have 2 var :
var latitude;
var longitude;
then :
Location({Key? key, this.latitude , this.longitude}) : super(key: key);
and after some works when I print them I get the value
print(widget.latitude);
print(widget.longitude);
there is no problem here BUT when I want to use these vars in another class like this :
var myLat = Location().latitude;
var myLong = Location().longitude;
the values are NULL
how can get the values the second class too?