copyWith method

  1. @override
AgentMessageSpec copyWith({
  1. StyleSpec<BoxSpec>? container,
  2. StyleSpec<BoxSpec>? surface,
  3. StyleSpec<TextSpec>? text,
  4. StyleSpec<BoxSpec>? header,
  5. StyleSpec<BoxSpec>? footer,
  6. double? maxWidthFactor,
  7. 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,
  );
}