How to call a super constructor in Dart?

Posted by Pinki | Updated on | Dart

Want to call a super constructor in Dart? Yes, it is, the syntax is close to C#, here is an example with both default constructor and named constructor:

If you want to initialize instance variables in the subclass, the super() call must be last in an initializer list.


If you like this question & answer and want to contribute, then write your question & answer and email to freewebmentor[@]gmail.com. Your question and answer will appear on FreeWebMentor.com and help other developers.

Related Questions & Answers