Close and Navigate compilation error after updating to 8.0.2 from 5.x when trying to return bool from navigation


return await NavigationService.Navigate<LocationDisclosureViewModel, bool?>();

no longer valid. Get a compilation error stating it must be a reference type.
The type ‘bool?’ must be a reference type in order to use it as parameter ‘TResult’ in the generic type or method ‘IMvxNavigationService.Navigate<TViewModel, TResult>(IMvxBundle?, CancellationToken)’

Also when trying to invoke Close, no longer valid.

await NavigationService.Close(this, false);

Looked at source , seems like change to interface to change Result type to inherit from notnull to class. What is the recommended fix for this? We just need to return a simple bool, not a complex class.

Source: Xamarin.ios Questions

Categorised as Uncategorised Tagged , ,


Leave a Reply

Your email address will not be published. Required fields are marked *

Still Have Questions?

Our dedicated development team is here for you!

We can help you find answers to your question for as low as 5$.

Contact Us