toConstructor method

String toConstructor(
  1. String className
)

Implementation

String toConstructor(String className) {
  final declarations = where((e) => e.name != null).map((e) => e.toConstructor()).join('\n').trim();
  return ModelTemplates.indented('const $className({\n  $declarations\n});', indent: 1);
}