copyWith method

  1. @override
StreamingTextTheme copyWith({
  1. TextStyle? textStyle,
  2. @Deprecated('Use markdownStyleSheet instead') TextStyle? markdownStyle,
  3. TextStyle? markdownStyleSheet,
  4. EdgeInsets? defaultPadding,
  5. TextStyle? inlineLatexStyle,
  6. TextStyle? blockLatexStyle,
  7. double? latexScale,
  8. bool? latexFadeInEnabled,
})
override

Creates a copy of this theme extension with the given fields replaced by the non-null parameter values.

Implementation

@override
StreamingTextTheme copyWith({
  TextStyle? textStyle,
  @Deprecated('Use markdownStyleSheet instead') TextStyle? markdownStyle,
  TextStyle? markdownStyleSheet,
  EdgeInsets? defaultPadding,
  TextStyle? inlineLatexStyle,
  TextStyle? blockLatexStyle,
  double? latexScale,
  bool? latexFadeInEnabled,
}) {
  return StreamingTextTheme(
    textStyle: textStyle ?? this.textStyle,
    // ignore: deprecated_member_use_from_same_package
    markdownStyle: markdownStyle ?? this.markdownStyle,
    // ignore: deprecated_member_use_from_same_package
    markdownStyleSheet:
        markdownStyleSheet ??
        this.markdownStyleSheet ??
        // ignore: deprecated_member_use_from_same_package
        (markdownStyle ?? this.markdownStyle),
    defaultPadding: defaultPadding ?? this.defaultPadding,
    inlineLatexStyle: inlineLatexStyle ?? this.inlineLatexStyle,
    // ignore: deprecated_member_use_from_same_package
    blockLatexStyle: blockLatexStyle ?? this.blockLatexStyle,
    // ignore: deprecated_member_use_from_same_package
    latexScale: latexScale ?? this.latexScale,
    // ignore: deprecated_member_use_from_same_package
    latexFadeInEnabled: latexFadeInEnabled ?? this.latexFadeInEnabled,
  );
}