Dart Inheritance
Dart inheritance is defined as the process of deriving the properties and characteristics of another class. It provides the ability to create a new class from an existing class. It is the most essential concept of the oops(Object-Oriented programming approach). We can reuse the all the behavior and characteristics of the previous class in the new class.
Parent Class - A class which is inherited by the other class is called superclass or parent class. It is also known as a base class.
Child Class - A class which inherits properties from other class is called the child class. It is also known as the derived class or subclass.
Suppose we have a fleet of cars, and we create three classes as Duster, Maruti, and Jaguar. The methods modelName(), milage(), and man_year() will be same for all of the three classes. By using the inheritance, we don't need to write these functions in each of the three classes.
Dart for Flutter. Explore how to use Constructors both Default and Named during Inheritance. See how to call Super / Parent class constructor from the sub/child class using super keyword and also explore how to pass values to the super class constructors from the child class constructor. Along with all these, check out how to deal with Named, no-argument or parameterised constructors during Inheritance