createScript method Null safety

String createScript()

Implementation

String createScript() {
  if (primary) {
    if (fieldType.toLowerCase() == 'int') {
      return '$fieldName serial PRIMARY KEY';
    } else {
      return '$fieldName $fieldType PRIMARY KEY';
    }
  } else {
    return '$fieldName $fieldType';
  }
}