copyWith method
Creates a copy of this instance, replacing the specified fields.
Implementation
FieldModel copyWith({
Object? fieldPath,
dynamic? fieldType,
bool? nullable,
List<Map<String, dynamic>>? children,
bool? primaryKey,
bool? foreignKey,
String? description,
Object? references,
String? columnDefault,
}) {
return FieldModel.assertRequired(
fieldPath: fieldPath ?? this.fieldPath,
fieldType: fieldType ?? this.fieldType,
nullable: nullable ?? this.nullable,
children: children ?? this.children,
primaryKey: primaryKey ?? this.primaryKey,
foreignKey: foreignKey ?? this.foreignKey,
description: description ?? this.description,
references: references ?? this.references,
columnDefault: columnDefault ?? this.columnDefault,
);
}