SchemaColumn.relationship constructor Null safety

SchemaColumn.relationship(
  1. String name,
  2. ManagedPropertyType type,
  3. {bool? isNullable = true,
  4. bool? isUnique = false,
  5. String? relatedTableName,
  6. String? relatedColumnName,
  7. DeleteRule rule = DeleteRule.nullify}
)

A convenience constructor for properties that represent foreign key relationships.

Implementation

SchemaColumn.relationship(
  this.name,
  ManagedPropertyType type, {
  this.isNullable = true,
  this.isUnique = false,
  this.relatedTableName,
  this.relatedColumnName,
  DeleteRule rule = DeleteRule.nullify,
}) {
  isIndexed = true;
  _type = typeStringForType(type);
  _deleteRule = deleteRuleStringForDeleteRule(rule);
}