copyWith method
Creates a copy of this instance, replacing the specified fields.
Implementation
FieldModel copyWith({
List<String>? fieldPath,
dynamic? fieldType,
bool? nullable,
List<Map<String, dynamic>>? children,
bool? primaryKey,
bool? foreignKey,
Object? fallback,
String? description,
}) {
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,
fallback: fallback ?? this.fallback,
description: description ?? this.description,
);
}