Option to enable required
on a property generated by ObservableProperty
#913
Labels
analyzer 👓
A new analyzer being implemented or updated
feature request 📬
A request for new changes to improve functionality
mvvm-toolkit 🧰
Issues/PRs for the MVVM Toolkit
Overview
Currently there is no option to add the
required
keyword to the property generated by theObservableProperty
. This is unwanted, becauserequired
is there for a reason: in many cases it's not correct for a property to ever be null[able] (The whole nullable/init/require stuff is really usefull in creating a safe application, so it would be weird not to support it).So I suggest an option to enable
required
on the generated property is added.API breakdown
Usage example
Breaking change?
No
Alternatives
Alternatively? Maybe a separate attribute
RequiredObservablePropertyAttribute
?Additional context
No response
Help us help you
Yes, but only if others can assist
The text was updated successfully, but these errors were encountered: