protected virtual Xamarin.Forms.Page ResolvePage(LazyLoadedPage lazyLoadedPage)
        {
            var innerPage = FreshPageModelResolver.ResolvePageModel(lazyLoadedPage.ViewModelType, lazyLoadedPage.Data); /////// null Reference exception here!!

            innerPage.GetModel().CurrentNavigationServiceName = NavigationServiceName;
            return(CreateContainerPage(innerPage));
        }
        public virtual void AddPage(string modelName, string title, string icon = null, object data = null)
        {
            var pageToAdd = new LazyLoadedPage()
            {
                ViewModelType = Type.GetType(modelName),
                Title         = title,
                Icon          = icon,
                Data          = data
            };

            Pages.Add(pageToAdd);
            if (Pages.Count == 1)
            {
                Detail = ResolvePage(pageToAdd);
            }
        }
        public virtual void AddPage <T>(string modelName, string title, string icon = null, object data = null)
            where T : FreshBasePageModel
        {
            var pageToAdd = new LazyLoadedPage()
            {
                ViewModelType = Type.GetType(modelName),
                Data          = data,
                Icon          = icon,
                Title         = title
            };

            Pages.Add(pageToAdd);
            if (Pages.Count == 1)
            {
                Detail = ResolvePage(pageToAdd);
            }

            _listView.ItemsSource = Pages.GroupBy(item => item.Group)
                                    .Select(item => new Grouping <string, LazyLoadedPage>(item.Key, item.ToList())).ToList();
        }