public async void OnSave() { MessageDatabase db = new MessageDatabase(dbPath); if (CheckFields()) { var SaveMessage = await db.GetMessageAsync(emergencyName); SaveMessage.MessageTemplate = messageTemplate; DependencyService.Get <IToast>().Toasts("updateMessage", db.UpdateMessage(SaveMessage)); } else { DependencyService.Get <IToast>().Toasts("updateMessage", "failed"); } await PopupNavigation.Instance.PopAsync(true); }