You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We did discuss allowing f?(args) as a way to invoke f on arguments args if f is non-null and otherwise skip. But f?.call(args) does exactly that already, so the need isn't that urgent, and it may create some grammar ambiguities so it wasn't considered worthwhile.
Thanks! I think we should close this issue because the code is working as intended. Please create a new issue as needed, for instance, if you wish to make it a language proposal (in the language repository). Most likely, it could be a comment on dart-lang/language#404.
Say a class had a nullable method, i.e. an optional callback.
In order to avoid an error, I have to do a null-check on the method before executing it:
But it would make the code look a lot cleaner, if this were possible:
The text was updated successfully, but these errors were encountered: