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

[Feature] Required navigation parameters #60

Open
BurkusCat opened this issue May 12, 2024 · 0 comments
Open

[Feature] Required navigation parameters #60

BurkusCat opened this issue May 12, 2024 · 0 comments
Assignees
Labels
enhancement New feature or request

Comments

@BurkusCat
Copy link
Owner

Is your feature request related to a problem? Please describe.
A page that is being navigated to may require certain parameters to function properly. If these parameters are not passed, the page may not work well.

Describe the solution you'd like
A way to mark certain navigation parameters as mandatory/required when navigating to a page. If not present, they should throw an exception to alert the developer that the navigation hasn't been done correctly.

Describe alternatives you've considered
N/A

Proposed APIs
If possible, try to propose how the API might look. For example:

// Above a viewmodel
[MapNavigationParameter(nameof(ShowLabel), NavigationParameterKeys.ShowLabel, true)] // required

[MapNavigationParameter(nameof(Abc), NavigationParameterKeys.Abc, required: true)] // required

[MapNavigationParameter(nameof(LabelText), NavigationParameterKeys.LabelText, false)] // not required

[MapNavigationParameter(nameof(Xyz), NavigationParameterKeys.Xyz)] // not required

Additional context
N/A

@BurkusCat BurkusCat added the enhancement New feature or request label May 12, 2024
@BurkusCat BurkusCat self-assigned this May 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant