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
I suspect that before the addition of the "required" keyword to the language, all named arguments were functionally optional so I can see how we got here. :)
Named Required Parameters are expected to be passed as optionalParameters
I had initially written my code to pass required named parameters into the requiredParameters array, that appears to be wrong. It generates this:
There is even a test for this. 🤣
https://github.com/dart-lang/code_builder/blob/master/test/specs/method_test.dart#L496
The meta issue is that the split between "requiredParameters" and "optionalParameters" doesn't make sense (and isn't documented):
https://pub.dev/documentation/code_builder/latest/code_builder/MethodBuilder-class.html
(There is no mention of what type of Parameters should end up in one vs the other.)
The text was updated successfully, but these errors were encountered: