Flexible fixed, optional and named argument method signatures #17101
Labels
area-language
Dart language related items (some items might be better tracked at github.com/dart-lang/language).
closed-duplicate
Closed in favor of an existing report
type-enhancement
A request for a change that isn't a bug
This issue was originally filed by @rbishop-bah
This is a suggestion for consideration for Dart 2.0
I'd like to be able to do something like this:
myMethod(dynamic a, [String b], {num q, num r, num s}, Point p, {String str}, [num z], List aList) {...}
I'd like to be able to combine fixed, optional and optional-named arguments in any combination I think is appropriate for the method I'm writing and have the analyzer/compiler/editor enforce the use of proper signatures.
myMethod("a", "b", r:7, point, str:"hello", 12, []);
myMethod("a", q:7, r:5, point, [11]);
myMethod("a", point, str:"goodbye", null);
all valid. Etc. Many combinations possible.
Issue #7056 is similar.
The text was updated successfully, but these errors were encountered: