copyWith method

  1. @override
CustomThemeExtension copyWith({
  1. Color? chatBackground,
  2. Color? messageBubbleColor,
  3. Color? userBubbleColor,
  4. Color? messageTextColor,
  5. Color? inputBackgroundColor,
  6. Color? inputBorderColor,
  7. Color? inputTextColor,
  8. Color? hintTextColor,
  9. Color? backToBottomButtonColor,
  10. Color? sendButtonColor,
  11. Color? sendButtonIconColor,
})
override

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

Implementation

@override
CustomThemeExtension copyWith({
  Color? chatBackground,
  Color? messageBubbleColor,
  Color? userBubbleColor,
  Color? messageTextColor,
  Color? inputBackgroundColor,
  Color? inputBorderColor,
  Color? inputTextColor,
  Color? hintTextColor,
  Color? backToBottomButtonColor,
  Color? sendButtonColor,
  Color? sendButtonIconColor,
}) {
  return CustomThemeExtension(
    chatBackground: chatBackground ?? this.chatBackground,
    messageBubbleColor: messageBubbleColor ?? this.messageBubbleColor,
    userBubbleColor: userBubbleColor ?? this.userBubbleColor,
    messageTextColor: messageTextColor ?? this.messageTextColor,
    inputBackgroundColor: inputBackgroundColor ?? this.inputBackgroundColor,
    inputBorderColor: inputBorderColor ?? this.inputBorderColor,
    inputTextColor: inputTextColor ?? this.inputTextColor,
    hintTextColor: hintTextColor ?? this.hintTextColor,
    backToBottomButtonColor:
        backToBottomButtonColor ?? this.backToBottomButtonColor,
    sendButtonColor: sendButtonColor ?? this.sendButtonColor,
    sendButtonIconColor: sendButtonIconColor ?? this.sendButtonIconColor,
  );
}