forGenerator property
String
get
forGenerator
Output for generator
Implementation
String get forGenerator {
final tableString = tables
.map(
(t) => t.forGenerator
// Add indentation
.replaceAll('\n\t', '\n\t\t\t')
.replaceAll('\n)', '\n\t\t)'),
)
.join(',\n\t\t');
return '''Schema(
\t$version,
\tgeneratorVersion: $generatorVersion,
\ttables: <SchemaTable>{
\t\t$tableString
\t}
)'''
.replaceAll('\t', ' ');
}