Reputation: 10709
I have a dart class with a lot of named arguments. Is there a simple way to "inherit" all named arguments from parent (or mixin) class (and delegate their initialisation to super() ), without repeating all arguments in child constructor?
Upvotes: 0
Views: 960
Reputation: 89995
Short of stuffing all arguments into a separate object and making all of your classes pass that around, no, there is no simple way to forward arguments. There are a number of issues requesting some ability to do so (such as https://github.com/dart-lang/language/issues/493 and the various issues it links to).
Upvotes: 1