copyWith method
Creates a copy with replaced values.
Implementation
TextPart copyWith({
Object? text = unsetCopyWithValue,
Object? thought = unsetCopyWithValue,
Object? thoughtSignature = unsetCopyWithValue,
}) {
return TextPart(
text == unsetCopyWithValue ? this.text : text! as String,
thought: thought == unsetCopyWithValue ? this.thought : thought as bool?,
thoughtSignature: thoughtSignature == unsetCopyWithValue
? this.thoughtSignature
: thoughtSignature as List<int>?,
);
}