copyWith method
CodeBlockStyle
copyWith({
- Color? backgroundColor,
- Color? borderColor,
- double? borderWidth,
- Radius? borderRadius,
- EdgeInsetsGeometry? padding,
- EdgeInsetsGeometry? headerPadding,
- String? fontFamily,
- String? fontFamilyPackage,
- double? fontSize,
- Color? textColor,
- bool? showLanguageLabel,
- TextStyle? languageStyle,
- bool? showCopyButton,
- String? copyLabel,
- String? copiedLabel,
A copy with the given fields replaced.
Implementation
CodeBlockStyle copyWith({
Color? backgroundColor,
Color? borderColor,
double? borderWidth,
Radius? borderRadius,
EdgeInsetsGeometry? padding,
EdgeInsetsGeometry? headerPadding,
String? fontFamily,
String? fontFamilyPackage,
double? fontSize,
Color? textColor,
bool? showLanguageLabel,
TextStyle? languageStyle,
bool? showCopyButton,
String? copyLabel,
String? copiedLabel,
}) {
return CodeBlockStyle(
backgroundColor: backgroundColor ?? this.backgroundColor,
borderColor: borderColor ?? this.borderColor,
borderWidth: borderWidth ?? this.borderWidth,
borderRadius: borderRadius ?? this.borderRadius,
padding: padding ?? this.padding,
headerPadding: headerPadding ?? this.headerPadding,
fontFamily: fontFamily ?? this.fontFamily,
fontFamilyPackage: fontFamilyPackage ?? this.fontFamilyPackage,
fontSize: fontSize ?? this.fontSize,
textColor: textColor ?? this.textColor,
showLanguageLabel: showLanguageLabel ?? this.showLanguageLabel,
languageStyle: languageStyle ?? this.languageStyle,
showCopyButton: showCopyButton ?? this.showCopyButton,
copyLabel: copyLabel ?? this.copyLabel,
copiedLabel: copiedLabel ?? this.copiedLabel,
);
}