Replies: 1 comment
-
After validation, generating nullable properties might cause more confusion. For instance a Related discussion: #2170 |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
When we have a property
Feed<int> MyValue
in the model, we generate aint MyValue { get; set; }
.None
, the getter returnsdefault(int) = 0
.default(T)
is considered asNone
(if type of the feed is flagged as non nullable).The only option currently is to create a
State<int?>
, but this impact the user experience in the model and would causeSome(null)
while usually user expect aNone
(just like before we updated the public API to improve nullable support)Generating a nullable
int? MyValue { get; set; }
could improve user experience ... but:bool?
(e.g.ToggleButton
)bool
(e.g.ToggleSwitch
)TextBlock
)Related unoplatform/uno#15349 (comment)
Beta Was this translation helpful? Give feedback.
All reactions