copyWith method
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,
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,
);
}