Navigating to one of the tab in my Xamarin Forms app is flickering and then the apps shut down. Please help
public partial class SoccerDailyStatus : ContentPage
{
private SQLiteConnection conn;
SoccerAvailability status;
public SoccerDailyStatus(SoccerAvailability soccerStatus)
{
InitializeComponent();
conn = DependencyService.Get<Isqlite>().GetConnection();
conn.CreateTable<SoccerAvailability>();
status = soccerStatus;
BindingContext = status;
}
protected override async void OnAppearing()
{
base.OnAppearing();
await DisplaySoccerStatus();
}
async Task DisplaySoccerStatus()
{
List<SoccerAvailability> myList = (from x in conn.Table<SoccerAvailability>() select x).ToList();
if (myList != null)
{
SoccerAvailability soccerAvailability = new SoccerAvailability();
soccerAvailability.SoccerStatus = myList[0].SoccerStatus;
soccerAvailability.CurrentDate = DateTime.Now.ToString("ddMMyyyy");
await Navigation.PushAsync(new SoccerDailyStatus(soccerAvailability) { });
}
else
{
await DisplayAlert("Notification", "Unable to proccess status", "Cancel");
}
}
}