applyCustomStyle static method

TextStyle applyCustomStyle(
  1. TextStyle? baseStyle, {
  2. Color? color,
  3. double? fontSize,
  4. FontWeight? fontWeight,
  5. FontStyle? fontStyle,
  6. double? letterSpacing,
  7. double? wordSpacing,
  8. TextBaseline? textBaseline,
  9. double? height,
  10. Locale? locale,
  11. Paint? foreground,
  12. Paint? background,
  13. List<Shadow>? shadows,
  14. List<FontFeature>? fontFeatures,
  15. TextDecoration? decoration,
  16. Color? decorationColor,
  17. TextDecorationStyle? decorationStyle,
  18. double? decorationThickness,
})

Implementation

static TextStyle applyCustomStyle(
    TextStyle? baseStyle, {
      Color? color,
      double? fontSize,
      FontWeight? fontWeight,
      FontStyle? fontStyle,
      double? letterSpacing,
      double? wordSpacing,
      TextBaseline? textBaseline,
      double? height,
      Locale? locale,
      Paint? foreground,
      Paint? background,
      List<Shadow>? shadows,
      List<FontFeature>? fontFeatures,
      TextDecoration? decoration,
      Color? decorationColor,
      TextDecorationStyle? decorationStyle,
      double? decorationThickness,
    }) {
  return baseStyle!.copyWith(
    color: color ?? baseStyle.color,
    fontSize: fontSize ?? baseStyle.fontSize,
    fontWeight: fontWeight ?? baseStyle.fontWeight,
    fontStyle: fontStyle ?? baseStyle.fontStyle,
    letterSpacing: letterSpacing ?? baseStyle.letterSpacing,
    wordSpacing: wordSpacing ?? baseStyle.wordSpacing,
    textBaseline: textBaseline ?? baseStyle.textBaseline,
    height: height ?? baseStyle.height,
    locale: locale ?? baseStyle.locale,
    foreground: foreground ?? baseStyle.foreground,
    background: background ?? baseStyle.background,
    shadows: shadows ?? baseStyle.shadows,
    fontFeatures: fontFeatures ?? baseStyle.fontFeatures,
    decoration: decoration ?? baseStyle.decoration,
    decorationColor: decorationColor ?? baseStyle.decorationColor,
    decorationStyle: decorationStyle ?? baseStyle.decorationStyle,
    decorationThickness: decorationThickness ?? baseStyle.decorationThickness,
  );
}