Polymorphism

Polymorphism is achieved by inheritance and can be regarded as the ability of an object to behave like another; for example, the int type is also a num type. The following also applies:

  • Dart allows overriding parent methods to change their original behavior.
  • Dart does not allow overloading in the way you may be familiar with. You cannot define the same method twice with different arguments. You can simulate overloading by using flexible argument definitions (that is, optional and positional, as seen in the previous Functions section) or not use it at all.
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.145.156.46