Quantcast
Viewing latest article 3
Browse Latest Browse All 4

Answer by Shailen Tuli for How do I call on the super class' constructor and other statements in Dart?

You can call super in this way:

abstract class Animal {  String name;  Animal (String this.name);}class Dog extends Animal {  Dog() : super('Spot') {    print("Dog was created");  }}void main() {  var d = new Dog(); // Prints 'Dog was created'.  print(d.name);     // Prints 'Spot'.}

Viewing latest article 3
Browse Latest Browse All 4

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>