Hi Techie,
How to call method inside the messaging center with returning parameter.
private async void BtnRegistration_Clicked(object sender, EventArgs e)
{
string image = "Deafult.jpeg";
MessagingCenter.Subscribe<App, List>(App.Current, "OneMessage", async (snd, arg) =>
{
Model model = arg.FirstOrDefault();
txtName.Text = model.Group_Name;
image = model.ImagePath;
var accessToken = Settings.AccessToken;
var client = new HttpClient();
string Groupname = txtName.Text;
var json = JsonConvert.SerializeObject(models); client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue( "Bearer", accessToken); HttpContent content = new StringContent(json); content.Headers.ContentType = new MediaTypeHeaderValue("application/json"); var response =await client.PostAsync("API CALL ", content); }); BtnRegistration.IsEnabled = true; }