Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

System.NullReferenceException: Object reference not set to an instance of an object. #12

Open
psudodev opened this issue Aug 1, 2023 · 0 comments

Comments

@psudodev
Copy link

psudodev commented Aug 1, 2023

{System.NullReferenceException: Object reference not set to an instance of an object.
at FreshMvvm.Maui.FreshPageModelResolver.ResolvePageModel[ProcessAuditPopupViewModel](Object data, ProcessAuditPopupViewModel pageModel)

at

I am using Mopups in My Maui project with Freshmvvm.Maui

 public static Task PushPopup<T>(this IPageModelCoreMethods coreMethods, object data = null) where T : FreshBasePageModel
    {

        T pageModel = DependencyService.Resolve<T>();
        var page = FreshPageModelResolver.ResolvePageModel(data, pageModel) as PopupPage;
        return MopupService.Instance.PushAsync(page);
    }
    
    as mentioned in the Blog TinyIOC has been removed and by default we use the Microsoft default dependency injection. The biggest advantage of this is you can bring in any container that supports the Microsoft Dependency Injection.

I might be missing the obvious here but It fails to Inject the DependecyService

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant