getLocationTemp method

Future<LatLong> getLocationTemp({
  1. required Future openSettingCallback(),
  2. required dynamic onDefaultCallback(
    1. String
    ),
})

Implementation

Future<LatLong> getLocationTemp({
  required Future<dynamic> Function() openSettingCallback,
  required Function(String) onDefaultCallback,
}) async {
  try {
    final position = await determinePositionTemp(openSettingCallback);
    return LatLong(lat: position.latitude, long: position.longitude);
  } catch (e) {
    Logger.e("get location error: $e");
    onDefaultCallback('$e. Using default location.');
    return defaultLocation;
  }
}