copyWith method
MarkdownStyleSheet
copyWith({
- TextStyle? a,
- TextStyle? p,
- EdgeInsets? pPadding,
- TextStyle? code,
- TextStyle? h1,
- EdgeInsets? h1Padding,
- TextStyle? h2,
- EdgeInsets? h2Padding,
- TextStyle? h3,
- EdgeInsets? h3Padding,
- TextStyle? h4,
- EdgeInsets? h4Padding,
- TextStyle? h5,
- EdgeInsets? h5Padding,
- TextStyle? h6,
- EdgeInsets? h6Padding,
- TextStyle? em,
- TextStyle? strong,
- TextStyle? del,
- TextStyle? blockquote,
- TextStyle? img,
- TextStyle? checkbox,
- double? blockSpacing,
- double? listIndent,
- TextStyle? listBullet,
- EdgeInsets? listBulletPadding,
- TextStyle? tableHead,
- TextStyle? tableBody,
- TextAlign? tableHeadAlign,
- TableBorder? tableBorder,
- TableColumnWidth? tableColumnWidth,
- EdgeInsets? tableCellsPadding,
- Decoration? tableCellsDecoration,
- TableCellVerticalAlignment? tableVerticalAlignment,
- EdgeInsets? blockquotePadding,
- Decoration? blockquoteDecoration,
- EdgeInsets? codeblockPadding,
- Decoration? codeblockDecoration,
- Decoration? horizontalRuleDecoration,
- WrapAlignment? textAlign,
- WrapAlignment? h1Align,
- WrapAlignment? h2Align,
- WrapAlignment? h3Align,
- WrapAlignment? h4Align,
- WrapAlignment? h5Align,
- WrapAlignment? h6Align,
- WrapAlignment? unorderedListAlign,
- WrapAlignment? orderedListAlign,
- WrapAlignment? blockquoteAlign,
- WrapAlignment? codeblockAlign,
- String? superscriptFontFeatureTag,
- @Deprecated('Use textScaler instead.') double? textScaleFactor,
- TextScaler? textScaler,
Creates a MarkdownStyleSheet based on the current style, with the provided parameters overridden.
Implementation
MarkdownStyleSheet copyWith({
TextStyle? a,
TextStyle? p,
EdgeInsets? pPadding,
TextStyle? code,
TextStyle? h1,
EdgeInsets? h1Padding,
TextStyle? h2,
EdgeInsets? h2Padding,
TextStyle? h3,
EdgeInsets? h3Padding,
TextStyle? h4,
EdgeInsets? h4Padding,
TextStyle? h5,
EdgeInsets? h5Padding,
TextStyle? h6,
EdgeInsets? h6Padding,
TextStyle? em,
TextStyle? strong,
TextStyle? del,
TextStyle? blockquote,
TextStyle? img,
TextStyle? checkbox,
double? blockSpacing,
double? listIndent,
TextStyle? listBullet,
EdgeInsets? listBulletPadding,
TextStyle? tableHead,
TextStyle? tableBody,
TextAlign? tableHeadAlign,
TableBorder? tableBorder,
TableColumnWidth? tableColumnWidth,
EdgeInsets? tableCellsPadding,
Decoration? tableCellsDecoration,
TableCellVerticalAlignment? tableVerticalAlignment,
EdgeInsets? blockquotePadding,
Decoration? blockquoteDecoration,
EdgeInsets? codeblockPadding,
Decoration? codeblockDecoration,
Decoration? horizontalRuleDecoration,
WrapAlignment? textAlign,
WrapAlignment? h1Align,
WrapAlignment? h2Align,
WrapAlignment? h3Align,
WrapAlignment? h4Align,
WrapAlignment? h5Align,
WrapAlignment? h6Align,
WrapAlignment? unorderedListAlign,
WrapAlignment? orderedListAlign,
WrapAlignment? blockquoteAlign,
WrapAlignment? codeblockAlign,
String? superscriptFontFeatureTag,
@Deprecated('Use textScaler instead.') double? textScaleFactor,
TextScaler? textScaler,
}) {
assert(
textScaler == null || textScaleFactor == null,
'textScaleFactor is deprecated and cannot be specified when textScaler is specified.',
);
// If either of textScaler or textScaleFactor is non-null, pass null for the
// other instead of the previous value, since only one is allowed.
final TextScaler? newTextScaler =
textScaler ?? (textScaleFactor == null ? this.textScaler : null);
final double? nextTextScaleFactor =
textScaleFactor ?? (textScaler == null ? this.textScaleFactor : null);
return MarkdownStyleSheet(
a: a ?? this.a,
p: p ?? this.p,
pPadding: pPadding ?? this.pPadding,
code: code ?? this.code,
h1: h1 ?? this.h1,
h1Padding: h1Padding ?? this.h1Padding,
h2: h2 ?? this.h2,
h2Padding: h2Padding ?? this.h2Padding,
h3: h3 ?? this.h3,
h3Padding: h3Padding ?? this.h3Padding,
h4: h4 ?? this.h4,
h4Padding: h4Padding ?? this.h4Padding,
h5: h5 ?? this.h5,
h5Padding: h5Padding ?? this.h5Padding,
h6: h6 ?? this.h6,
h6Padding: h6Padding ?? this.h6Padding,
em: em ?? this.em,
strong: strong ?? this.strong,
del: del ?? this.del,
blockquote: blockquote ?? this.blockquote,
img: img ?? this.img,
checkbox: checkbox ?? this.checkbox,
blockSpacing: blockSpacing ?? this.blockSpacing,
listIndent: listIndent ?? this.listIndent,
listBullet: listBullet ?? this.listBullet,
listBulletPadding: listBulletPadding ?? this.listBulletPadding,
tableHead: tableHead ?? this.tableHead,
tableBody: tableBody ?? this.tableBody,
tableHeadAlign: tableHeadAlign ?? this.tableHeadAlign,
tableBorder: tableBorder ?? this.tableBorder,
tableColumnWidth: tableColumnWidth ?? this.tableColumnWidth,
tableCellsPadding: tableCellsPadding ?? this.tableCellsPadding,
tableCellsDecoration: tableCellsDecoration ?? this.tableCellsDecoration,
tableVerticalAlignment:
tableVerticalAlignment ?? this.tableVerticalAlignment,
blockquotePadding: blockquotePadding ?? this.blockquotePadding,
blockquoteDecoration: blockquoteDecoration ?? this.blockquoteDecoration,
codeblockPadding: codeblockPadding ?? this.codeblockPadding,
codeblockDecoration: codeblockDecoration ?? this.codeblockDecoration,
horizontalRuleDecoration:
horizontalRuleDecoration ?? this.horizontalRuleDecoration,
textAlign: textAlign ?? this.textAlign,
h1Align: h1Align ?? this.h1Align,
h2Align: h2Align ?? this.h2Align,
h3Align: h3Align ?? this.h3Align,
h4Align: h4Align ?? this.h4Align,
h5Align: h5Align ?? this.h5Align,
h6Align: h6Align ?? this.h6Align,
unorderedListAlign: unorderedListAlign ?? this.unorderedListAlign,
orderedListAlign: orderedListAlign ?? this.orderedListAlign,
blockquoteAlign: blockquoteAlign ?? this.blockquoteAlign,
codeblockAlign: codeblockAlign ?? this.codeblockAlign,
superscriptFontFeatureTag:
superscriptFontFeatureTag ?? this.superscriptFontFeatureTag,
textScaler: newTextScaler,
textScaleFactor: nextTextScaleFactor,
);
}