copyWith method
AnsiRendererOptions
copyWith({
- int? width,
- bool? hasDarkBackground,
- Style? textStyle,
- Style? h1Style,
- Style? h2Style,
- Style? h3Style,
- Style? h4Style,
- Style? h5Style,
- Style? h6Style,
- Style? emphasisStyle,
- Style? strongStyle,
- Style? codeStyle,
- Style? codeBlockStyle,
- Style? linkStyle,
- Style? blockquoteStyle,
- Color? blockquoteBorderColor,
- Style? strikethroughStyle,
- String? bulletChar,
- bool? hyperlinks,
- String? hrChar,
- int? hrWidth,
- String? checkboxChecked,
- String? checkboxUnchecked,
- int? listIndent,
- bool? codeBlockBorder,
- Border? tableBorder,
- Style? tableHeaderStyle,
- Style? tableCellStyle,
- Style? tableBorderStyle,
- bool? syntaxHighlighting,
- ChromaTheme? syntaxTheme,
- Border? codeBlockBorderStyle,
Creates a copy with the given fields replaced.
Implementation
AnsiRendererOptions copyWith({
int? width,
bool? hasDarkBackground,
Style? textStyle,
Style? h1Style,
Style? h2Style,
Style? h3Style,
Style? h4Style,
Style? h5Style,
Style? h6Style,
Style? emphasisStyle,
Style? strongStyle,
Style? codeStyle,
Style? codeBlockStyle,
Style? linkStyle,
Style? blockquoteStyle,
Color? blockquoteBorderColor,
Style? strikethroughStyle,
String? bulletChar,
bool? hyperlinks,
String? hrChar,
int? hrWidth,
String? checkboxChecked,
String? checkboxUnchecked,
int? listIndent,
bool? codeBlockBorder,
style_border.Border? tableBorder,
Style? tableHeaderStyle,
Style? tableCellStyle,
Style? tableBorderStyle,
bool? syntaxHighlighting,
ChromaTheme? syntaxTheme,
style_border.Border? codeBlockBorderStyle,
}) {
return AnsiRendererOptions(
width: width ?? this.width,
hasDarkBackground: hasDarkBackground ?? this.hasDarkBackground,
textStyle: textStyle ?? this.textStyle,
h1Style: h1Style ?? this.h1Style,
h2Style: h2Style ?? this.h2Style,
h3Style: h3Style ?? this.h3Style,
h4Style: h4Style ?? this.h4Style,
h5Style: h5Style ?? this.h5Style,
h6Style: h6Style ?? this.h6Style,
emphasisStyle: emphasisStyle ?? this.emphasisStyle,
strongStyle: strongStyle ?? this.strongStyle,
codeStyle: codeStyle ?? this.codeStyle,
codeBlockStyle: codeBlockStyle ?? this.codeBlockStyle,
linkStyle: linkStyle ?? this.linkStyle,
blockquoteStyle: blockquoteStyle ?? this.blockquoteStyle,
blockquoteBorderColor:
blockquoteBorderColor ?? this.blockquoteBorderColor,
strikethroughStyle: strikethroughStyle ?? this.strikethroughStyle,
bulletChar: bulletChar ?? this.bulletChar,
hyperlinks: hyperlinks ?? this.hyperlinks,
hrChar: hrChar ?? this.hrChar,
hrWidth: hrWidth ?? this.hrWidth,
checkboxChecked: checkboxChecked ?? this.checkboxChecked,
checkboxUnchecked: checkboxUnchecked ?? this.checkboxUnchecked,
listIndent: listIndent ?? this.listIndent,
codeBlockBorder: codeBlockBorder ?? this.codeBlockBorder,
tableBorder: tableBorder ?? this.tableBorder,
tableHeaderStyle: tableHeaderStyle ?? this.tableHeaderStyle,
tableCellStyle: tableCellStyle ?? this.tableCellStyle,
tableBorderStyle: tableBorderStyle ?? this.tableBorderStyle,
syntaxHighlighting: syntaxHighlighting ?? this.syntaxHighlighting,
syntaxTheme: syntaxTheme ?? this.syntaxTheme,
codeBlockBorderStyle: codeBlockBorderStyle ?? this.codeBlockBorderStyle,
);
}