copyWith method

GptMarkdownConfig copyWith({
  1. TextStyle? style,
  2. TextDirection? textDirection,
  3. void onLinkTab(
    1. String url,
    2. String title
    )?,
  4. TextAlign? textAlign,
  5. TextScaler? textScaler,
  6. String latexWorkaround(
    1. String tex
    )?,
  7. Widget latexBuilder(
    1. BuildContext context,
    2. String tex,
    3. TextStyle textStyle,
    4. bool inline,
    )?,
  8. Widget sourceTagBuilder(
    1. BuildContext context,
    2. String content,
    3. TextStyle textStyle
    )?,
  9. bool? followLinkColor,
  10. Widget codeBuilder(
    1. BuildContext context,
    2. String name,
    3. String code
    )?,
  11. int? maxLines,
  12. TextOverflow? overflow,
})

Implementation

GptMarkdownConfig copyWith({
  TextStyle? style,
  TextDirection? textDirection,
  final void Function(String url, String title)? onLinkTab,
  final TextAlign? textAlign,
  final TextScaler? textScaler,
  final String Function(String tex)? latexWorkaround,
  final Widget Function(
          BuildContext context, String tex, TextStyle textStyle, bool inline)?
      latexBuilder,
  final Widget Function(
          BuildContext context, String content, TextStyle textStyle)?
      sourceTagBuilder,
  bool? followLinkColor,
  final Widget Function(BuildContext context, String name, String code)?
      codeBuilder,
  final int? maxLines,
  final TextOverflow? overflow,
}) {
  return GptMarkdownConfig(
    style: style ?? this.style,
    textDirection: textDirection ?? this.textDirection,
    onLinkTab: onLinkTab ?? this.onLinkTab,
    textAlign: textAlign ?? this.textAlign,
    textScaler: textScaler ?? this.textScaler,
    latexWorkaround: latexWorkaround ?? this.latexWorkaround,
    latexBuilder: latexBuilder ?? this.latexBuilder,
    followLinkColor: followLinkColor ?? this.followLinkColor,
    codeBuilder: codeBuilder ?? this.codeBuilder,
    sourceTagBuilder: sourceTagBuilder ?? this.sourceTagBuilder,
    maxLines: maxLines ?? this.maxLines,
    overflow: overflow ?? this.overflow,
  );
}