BurkusCat / Burkus.Mvvm.Maui

A simple MVVM framework for .NET MAUI. It provides: navigation, lifecycle events, parameter passing, native dialog abstractions, and testability.
MIT License
24 stars 5 forks source link

[Bug] Nullable value types aren't supported in navigation parameters #43

Closed BurkusCat closed 8 months ago

BurkusCat commented 8 months ago

Describe the bug You can't use GetValue<char?> without getting an exception

To Reproduce Steps to reproduce the behavior:

  1. Add code such as:

    var test = parameters.GetValue<char?>("test");
  2. Observe exception

    System.ArgumentException : Cannot convert parameter value to type System.Nullable`1[System.Char]
    ---- System.InvalidCastException : Null object cannot be converted to a value type.

Expected behavior The framework supports passing nullable value types.