class Person {
late String name;
late int age;
Person();
Person.ap(this.name, this.age);
}
class Employee extends Person {
Employee(String name, int age) : super.ap(name, age); // This works
// This is giving error. The method 'ap' isn't defined in a superclass of 'Employee'.
Employee(String name, int age) {
super.ap(name, age);
}
}
What's the difference of calling unnamed constructor using super or inside the parenthesis?