myLocation static method
Implementation
static Future<Point> myLocation() async {
final check = await Permission.location.request();
if (check.isDenied) {
return const Point(
latitude: AppConstants.demoLatitude,
longitude: AppConstants.demoLongitude);
} else {
final location = await GeolocatorPlatform.instance.getCurrentPosition();
return Point(latitude: location.latitude, longitude: location.longitude);
}
}