concept super in category dart

appears as: super
Dart in Action

This is an excerpt from Manning's book Dart in Action.

This means if you wanted to use the constructor in the superclass, you’d need to write your own constructor in EnterpriseUser and use the super keyword to refer to the superclass’s constructor. You can do this in a special section of the constructor called the constructor initializer block, which appears between the constructor parameter list and the constructor body:

The constructor initializer is a block of code that Dart executes before the instance of the class has been created. This is the only place you can call super constructors; calling them in the constructor body isn’t allowed. You can also call any super constructor, including named constructors—the parameter list in your class doesn’t need to match the parameter list of the superclass. If the base class provides named super constructors, you can call any of them by using the superclass as the constructor name prefix. Likewise, a named constructor in the child class can call a superclass’s constructors at will:

The constructor initialization block is a comma-separated list of commands that can also be used to initialize final properties (as discussed in chapter 6), but any call to the super constructor must always come first.