classInstantiate method
Implementation
String classInstantiate(AssetType asset) {
final buffer = StringBuffer(className);
buffer.write('(');
buffer.write('\'${asset.posixStylePath}\'');
if (asset.flavors.isNotEmpty) {
buffer.write(', flavors: {');
final flavors = asset.flavors.map((e) => '\'$e\'').join(', ');
buffer.write(flavors);
buffer.write('}');
buffer.write(','); // Better formatting.
}
buffer.write(')');
return buffer.toString();
}