Question - What Is Method Overriding In Dart?
Answer -
In Dart, Method Overriding is a technique that child class redefines a method in its parent class.
Example:
void main() {
Child c = new Child();
c.m1(12);
}
class Parent {
void m1(int a){ print("value of a ");}
}
class Child extends Parent {
@override
void m1(int b) {
print("value of b ");
}
}