using Justice.Helpers; using Microsoft; namespace Justice.Views; public partial class DashboardPage : ContentPage { public DashboardPage() { InitializeComponent(); } public async void OnGetLocationClicked(object sender, EventArgs e) { try { var (latitude, longitude) = await GeolocationHelper.GetCurrentLocationAsync(); string address = await GeolocationHelper.GetReadableAddressAsync(latitude, longitude); LocationLabel.Text = $"{address}"; } catch (Exception ex) { await DisplayAlert("Error", ex.Message,"OK"); } } }