copyWith method

  1. @override
ChatColors copyWith({
  1. Color? surfaceBackground,
  2. Color? botBubbleBackground,
  3. Color? userBubbleBackground,
  4. Color? botBubbleForeground,
  5. Color? userBubbleForeground,
  6. Color? botBubbleShadow,
})
override

Creates a copy of this theme extension with the given fields replaced by the non-null parameter values.

Implementation

@override
ChatColors copyWith({
  Color? surfaceBackground,
  Color? botBubbleBackground,
  Color? userBubbleBackground,
  Color? botBubbleForeground,
  Color? userBubbleForeground,
  Color? botBubbleShadow,
}) {
  return ChatColors(
    surfaceBackground: surfaceBackground ?? this.surfaceBackground,
    botBubbleBackground: botBubbleBackground ?? this.botBubbleBackground,
    userBubbleBackground: userBubbleBackground ?? this.userBubbleBackground,
    botBubbleForeground: botBubbleForeground ?? this.botBubbleForeground,
    userBubbleForeground: userBubbleForeground ?? this.userBubbleForeground,
    botBubbleShadow: botBubbleShadow ?? this.botBubbleShadow,
  );
}