copyWith method

DartCodeViewerThemeData copyWith({
  1. TextStyle? baseStyle,
  2. TextStyle? classStyle,
  3. TextStyle? commentStyle,
  4. TextStyle? constantStyle,
  5. TextStyle? keywordStyle,
  6. TextStyle? numberStyle,
  7. TextStyle? punctuationStyle,
  8. TextStyle? stringStyle,
  9. Color? backgroundColor,
  10. Text? copyButtonText,
  11. bool? showCopyButton,
  12. double? height,
  13. double? width,
  14. ButtonStyle? buttonStyle,
})

Creates a copy of this object but with the given fields replaced with the new values.

Implementation

DartCodeViewerThemeData copyWith({
  TextStyle? baseStyle,
  TextStyle? classStyle,
  TextStyle? commentStyle,
  TextStyle? constantStyle,
  TextStyle? keywordStyle,
  TextStyle? numberStyle,
  TextStyle? punctuationStyle,
  TextStyle? stringStyle,
  Color? backgroundColor,
  Text? copyButtonText,
  bool? showCopyButton,
  double? height,
  double? width,
  ButtonStyle? buttonStyle,
}) {
  return DartCodeViewerThemeData(
    baseStyle: baseStyle ?? this.baseStyle,
    classStyle: classStyle ?? this.classStyle,
    commentStyle: commentStyle ?? this.commentStyle,
    constantStyle: constantStyle ?? this.constantStyle,
    keywordStyle: keywordStyle ?? this.keywordStyle,
    numberStyle: numberStyle ?? this.numberStyle,
    punctuationStyle: punctuationStyle ?? this.punctuationStyle,
    stringStyle: stringStyle ?? this.stringStyle,
    backgroundColor: backgroundColor ?? this.backgroundColor,
    copyButtonText: copyButtonText ?? this.copyButtonText,
    showCopyButton: showCopyButton ?? this.showCopyButton,
    height: height ?? this.height,
    width: width ?? this.width,
  );
}