private async Task AddImageAsync() { try { PlantTaggerV1.Models.Image img = await _photoPickerService.PickPhotoAsync(); await _plantService.AddImage(CurrentPlant.Uuid, img); await RefreshAsync(); } catch (Exception ex) { System.Diagnostics.Debug.WriteLine("Error: " + ex.Message); await DialogService.ShowAlertAsync(ex.Message, "Add Image Failed", "Ok"); } }
private async Task UpdateProfilePictureAsync() { try { PlantTaggerV1.Models.Image img = await _photoPickerService.PickPhotoAsync(); if (img != null) { this.CurrentUserProfile.ProfileImage = img; await _userService.SaveProfileImage(img); } } catch (Exception ex) { System.Diagnostics.Debug.WriteLine("Error: " + ex.Message); } }
protected async Task ChoosePhotoAsync() { PlantTaggerV1.Models.Image img = await _photoPickerService.PickPhotoAsync(); NewPlant.ProfileImage = img; }