diff --git a/lib/style/text_style/handschrift.dart b/lib/style/text_style/handschrift.dart index 2f88c80..7680505 100644 --- a/lib/style/text_style/handschrift.dart +++ b/lib/style/text_style/handschrift.dart @@ -194,34 +194,36 @@ class Handschrift extends TextStyle { TextOverflow? overflow, TextStyle? boldStyle, TextStyle? linkStyle, - }) => Handschrift( - inherit: inherit ?? this.inherit, - color: color ?? this.color, - backgroundColor: backgroundColor ?? this.backgroundColor, - fontSize: fontSize ?? this.fontSize, - fontWeight: fontWeight ?? this.fontWeight, - fontStyle: fontStyle ?? this.fontStyle, - letterSpacing: letterSpacing ?? this.letterSpacing, - wordSpacing: wordSpacing ?? this.wordSpacing, - textBaseline: textBaseline ?? this.textBaseline, - height: height ?? this.height, - leadingDistribution: leadingDistribution ?? this.leadingDistribution, - locale: locale ?? this.locale, - foreground: foreground ?? this.foreground, - background: background ?? this.background, - shadows: shadows ?? this.shadows, - fontFeatures: fontFeatures ?? this.fontFeatures, - fontVariations: fontVariations ?? this.fontVariations, - decoration: decoration ?? this.decoration, - decorationColor: decorationColor ?? this.decorationColor, - decorationStyle: decorationStyle ?? this.decorationStyle, - decorationThickness: decorationThickness ?? this.decorationThickness, - debugLabel: debugLabel ?? this.debugLabel, - fontFamily: fontFamily ?? this.fontFamily, - fontFamilyFallback: fontFamilyFallback ?? this.fontFamilyFallback, - package: package, - overflow: overflow ?? this.overflow, - boldStyle: boldStyle ?? _boldStyle, - linkStyle: linkStyle ?? _linkStyle, - ); + }) { + final textStyle = super.copyWith( + inherit: inherit, + color: color, + backgroundColor: backgroundColor, + fontSize: fontSize, + fontWeight: fontWeight, + fontStyle: fontStyle, + letterSpacing: letterSpacing, + wordSpacing: wordSpacing, + textBaseline: textBaseline, + height: height, + leadingDistribution: leadingDistribution, + locale: locale, + foreground: foreground, + background: background, + shadows: shadows, + fontFeatures: fontFeatures, + fontVariations: fontVariations, + decoration: decoration, + decorationColor: decorationColor, + decorationStyle: decorationStyle, + decorationThickness: decorationThickness, + debugLabel: debugLabel, + fontFamily: fontFamily, + fontFamilyFallback: fontFamilyFallback, + package: package, + overflow: overflow ?? this.overflow, + ); + + return Handschrift.fromTextStyle(textStyle, boldStyle: boldStyle ?? _boldStyle, linkStyle: linkStyle ?? _linkStyle); + } }