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
Currently when extending a class it is very tedious to pass each parameters to the super constructor.
This feature dart-lang/language#1855 will resolve most of the verbosity, however code completion should go a step further and be able to generate a constructor with super parameters
classHouse {
finalint windows;
House({requiredthis.windows});
}
classTestHouseextendsHouse {
// proposed, compilesTestHouse({super.windows});
// alternativelyTestHouse({int windows}) :super(windows: windows);
// currently, which does not compileTestHouse() :super()
}
Activity
[analysis_server] Include required named parameters in generated supe…
DanTup commentedon Dec 21, 2021
Fixed by dart-lang/sdk@8e40705, with dart-lang/sdk#47979 raised about supporting super initializers when available.
Thanks!