using System;
using System.Collections.Generic;
using System.Text;
using Xamarin.Forms;

namespace PhilExample.Utils
{
    internal static class ShellExtensions
    {
        internal static T GetCurrentPage<T>() where T : Page
        {
            return (Xamarin.Forms.Shell.Current?.CurrentItem?.CurrentItem as IShellSectionController)?.PresentedPage as T;
        }
    }
}
