How do I call a super constructor in Dart? Is it possible to call named super constructors?
Yes, but only if the superclass and the subclass you are creating are in the same library. (Since private identifiers are visible across the whole library they are defined in). Private identifiers are those that start with underscore.
class Foo {
Foo._private(int a, int b) {
//Code of private named constructor
}
}
class Bar extends Foo {
Bar(int a, int b) : super._private(a,b);
}