public async void Create() { try { Acr.UserDialogs.UserDialogs.Instance.ShowLoading(AppResource.alertLoading); InformativeMenu menu = new InformativeMenu(); if (imageStream != null) { //faz upload da imagem ApiService service = new ApiService(); menu.ImageUri = await service.UploadImage(imageStream); } menu.Title = txtTitle.Text; menu.Body = txtBody.Text; menu.Url = txtUrl.Text; menu.Name = txtName.Text; menu.IsDisabled = !swtActive.IsToggled; menu.OrderingNumber = Convert.ToInt32(txtPosition.Text); menu.CompanyId = Helpers.Settings.DisplayUserCompany; menu.LocationId = locationId; menu.CategoryGroupId = _group.Id; var result = await companyService.CreateInformativeMenu(menu); Acr.UserDialogs.UserDialogs.Instance.Toast(AppResource.lblItemUpdatedSucess); await App.AppCurrent.NavigationService.GoBack(); } catch (Exception ex) { this.DisplayAlert(MocoApp.Resources.AppResource.alertAlert, ex.Message, AppResource.textOk); } finally { Acr.UserDialogs.UserDialogs.Instance.HideLoading(); } }