Hi, I'm having trouble with showing a spinner/running a unit test. My unit test seems to fail due to Xamarin not supporting Task.Run()? If I uncomment the Task.Run out then the test completes successfully but my spinner doesn't show initially when I want it to, i.e. immediately after a button click.
My SomeCodeAsync method contains an API call which retries if it fails the first time and it was this which forced my hand into using the Task.Run().
Button click event...
//Show loading spinner
LoadingVisible = true;
await Task.Run(async () =>
{
await SomeAsyncTask();
});
This is just massively frustrating, can anybody please advise on what options I have to solve this?
Thanks