copyWith method

  1. @override
MdCode copyWith({
  1. TextStyle? codeSpan,
  2. EdgeInsets? codeblockPadding,
  3. BoxDecoration? codeblockDecoration,
  4. Color? copyIconColor,
  5. TextStyle? codeBlock,
})
override

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

Implementation

@override
MdCode copyWith({
  TextStyle? codeSpan,
  EdgeInsets? codeblockPadding,
  BoxDecoration? codeblockDecoration,
  Color? copyIconColor,
  TextStyle? codeBlock,
}) {
  return MdCode(
    codeSpan: codeSpan ?? this.codeSpan,
    codeblockPadding: codeblockPadding ?? this.codeblockPadding,
    codeblockDecoration: codeblockDecoration ?? this.codeblockDecoration,
    copyIconColor: copyIconColor ?? this.copyIconColor,
    codeBlock: codeBlock ?? this.codeBlock,
  );
}