copyWith method
Copies with changes
Implementation
FieldDefinition copyWith({
String? name,
String? displayName,
Type? type,
bool? isRequired,
dynamic defaultValue,
List<String>? validationRules,
String? description,
Map<String, dynamic>? metadata,
}) {
return FieldDefinition(
name: name ?? this.name,
displayName: displayName ?? this.displayName,
type: type ?? this.type,
isRequired: isRequired ?? this.isRequired,
defaultValue: defaultValue ?? this.defaultValue,
validationRules: validationRules ?? this.validationRules,
description: description ?? this.description,
metadata: metadata ?? this.metadata,
);
}