toModelString method

String toModelString()

Implementation

String toModelString() => '''
abstract class $className {
${assets.map((AssetItem item) => '  ${item.toModelString()}').join('\n')}
}

class ${AssetItem.className} {
final String path;

const ${AssetItem.className}(
  this.path,
);
}

class ${ImageAssetItem.className} extends ${AssetItem.className} {
final int width;
final int height;

const ${ImageAssetItem.className}(
  super.path,
  this.width,
  this.height,
);
}
''';