copyWith method

MarkdownStyleSheet copyWith({
  1. TextStyle? a,
  2. TextStyle? p,
  3. EdgeInsets? pPadding,
  4. TextStyle? code,
  5. TextStyle? h1,
  6. EdgeInsets? h1Padding,
  7. TextStyle? h2,
  8. EdgeInsets? h2Padding,
  9. TextStyle? h3,
  10. EdgeInsets? h3Padding,
  11. TextStyle? h4,
  12. EdgeInsets? h4Padding,
  13. TextStyle? h5,
  14. EdgeInsets? h5Padding,
  15. TextStyle? h6,
  16. EdgeInsets? h6Padding,
  17. TextStyle? em,
  18. TextStyle? strong,
  19. TextStyle? del,
  20. TextStyle? blockquote,
  21. TextStyle? img,
  22. TextStyle? checkbox,
  23. double? blockSpacing,
  24. double? listIndent,
  25. TextStyle? listBullet,
  26. EdgeInsets? listBulletPadding,
  27. TextStyle? tableHead,
  28. TextStyle? tableBody,
  29. TextAlign? tableHeadAlign,
  30. TableBorder? tableBorder,
  31. TableColumnWidth? tableColumnWidth,
  32. EdgeInsets? tableCellsPadding,
  33. Decoration? tableCellsDecoration,
  34. TableCellVerticalAlignment? tableVerticalAlignment,
  35. EdgeInsets? blockquotePadding,
  36. Decoration? blockquoteDecoration,
  37. EdgeInsets? codeblockPadding,
  38. Decoration? codeblockDecoration,
  39. Decoration? horizontalRuleDecoration,
  40. WrapAlignment? textAlign,
  41. WrapAlignment? h1Align,
  42. WrapAlignment? h2Align,
  43. WrapAlignment? h3Align,
  44. WrapAlignment? h4Align,
  45. WrapAlignment? h5Align,
  46. WrapAlignment? h6Align,
  47. WrapAlignment? unorderedListAlign,
  48. WrapAlignment? orderedListAlign,
  49. WrapAlignment? blockquoteAlign,
  50. WrapAlignment? codeblockAlign,
  51. String? superscriptFontFeatureTag,
  52. @Deprecated('Use textScaler instead.') double? textScaleFactor,
  53. 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,
  );
}