How do I initialise the variables of a super class in a named factory constructor? Here is my sample code:
class ClassA{ final a; final b; ClassA({this.a, this.b}); } class ClassB extends ClassA{ final c; List <String> myList; ClassB({this.c,this.myList}); factory ClassB.fromJson(json){ var list = json["list"] as List; List<String> tempList = []; list.forEach((item)=>tempList.add(item)); return ClassB( c: json["c"], myList: tempList ); } } I am not sure how or where exactly do i call the super constructor for Class A so that I can initialise its variables.