What does Extends do in flutter?

You can inherit from or extend a class using the extends keyword. This allows you share properties and methods between classes that are similar, but not exactly the same . Also, it allows different subtypes to share a common runtime type so that static analysis doesn’t fail.

Read more

What is meant by encapsulation?

By definition, encapsulation describes the idea of bundling data and methods that work on that data within one unit, like a class in Java . This concept is also often used to hide the internal representation, or state of an object from the outside. This is called information hiding.

Read more