toConstructor method
Implementation
String toConstructor(String className, {required bool hasExtends, required bool hasMixin}) {
final declarations = where((e) => e.name != null).map((e) => e.toConstructor()).join('\n').trim();
final isConst = (!hasExtends && !hasMixin) ? 'const ' : '';
return '$isConst$className({\n $declarations\n});'.indented();
}