copyWith method
AgentMessageSpec
copyWith({
- StyleSpec<
BoxSpec> ? container, - StyleSpec<
BoxSpec> ? surface, - StyleSpec<
TextSpec> ? text, - StyleSpec<
BoxSpec> ? header, - double? maxWidthFactor,
- double? collapsedHeight,
inherited
Creates a copy of this spec with the given fields replaced by the non-null parameter values.
Implementation
@override
AgentMessageSpec copyWith({
StyleSpec<BoxSpec>? container,
StyleSpec<BoxSpec>? surface,
StyleSpec<TextSpec>? text,
StyleSpec<BoxSpec>? header,
StyleSpec<BoxSpec>? footer,
double? maxWidthFactor,
double? collapsedHeight,
}) {
return AgentMessageSpec(
container: container ?? this.container,
surface: surface ?? this.surface,
text: text ?? this.text,
header: header ?? this.header,
footer: footer ?? this.footer,
maxWidthFactor: maxWidthFactor ?? this.maxWidthFactor,
collapsedHeight: collapsedHeight ?? this.collapsedHeight,
);
}