createScript method Null safety

String createScript()

Implementation

String createScript() {
  var lines = [
    'CREATE TABLE IF NOT EXISTS $tableName',
    '(',
    fields.map((e) => e.createScript()).toList().join(',\n'),
    ');'
  ];
  lines.add('\n');
  lines.addAll(indexes.map((e) => createIndexSQL(e)).toList());
  lines.add('\n');
  lines.addAll(uniqueIndexes.map((e) => createUniqueSQL(e)).toList());
  lines.add('\n');
  return lines.join('\n');
}