call method

  1. @override
Widget call({
  1. Color? color,
  2. Color? backgroundColor,
  3. double? fontSize,
  4. FontWeight? fontWeight,
  5. FontStyle? fontStyle,
  6. double? letterSpacing,
  7. double? wordSpacing,
  8. TextBaseline? textBaseline,
  9. double? height,
  10. TextLeadingDistribution? leadingDistribution,
  11. Locale? locale,
  12. Paint? foreground,
  13. Paint? background,
  14. List<Shadow>? shadows,
  15. List<FontFeature>? fontFeatures,
  16. List<FontVariation>? fontVariations,
  17. TextDecoration? decoration,
  18. Color? decorationColor,
  19. TextDecorationStyle? decorationStyle,
  20. double? decorationThickness,
  21. String? debugLabel,
  22. String? fontFamily,
  23. List<String>? fontFamilyFallback,
  24. String? package,
  25. TextOverflow? overflow,
})
override

Applies additional text style properties to this modifier.

All parameters are optional and can be used to override or extend the current text styling.

Parameters:

  • color (Color?, optional): Text color.
  • backgroundColor (Color?, optional): Background color for text.
  • fontSize (double?, optional): Font size in logical pixels.
  • fontWeight (FontWeight?, optional): Font weight (e.g., bold, normal).
  • fontStyle (FontStyle?, optional): Font style (e.g., italic, normal).
  • letterSpacing (double?, optional): Space between letters.
  • wordSpacing (double?, optional): Space between words.
  • textBaseline (TextBaseline?, optional): Text baseline alignment.
  • height (double?, optional): Line height multiplier.
  • leadingDistribution (TextLeadingDistribution?, optional): How to distribute line height.
  • locale (Locale?, optional): Locale for font selection.
  • foreground (Paint?, optional): Custom foreground paint.
  • background (Paint?, optional): Custom background paint.
  • shadows (List<Shadow>?, optional): Text shadows.
  • fontFeatures (List<FontFeature>?, optional): OpenType font features.
  • fontVariations (List<FontVariation>?, optional): Font variations.
  • decoration (TextDecoration?, optional): Text decoration (underline, etc.).
  • decorationColor (Color?, optional): Decoration color.
  • decorationStyle (TextDecorationStyle?, optional): Decoration style.
  • decorationThickness (double?, optional): Decoration thickness.
  • debugLabel (String?, optional): Debug label for text style.
  • fontFamily (String?, optional): Font family name.
  • fontFamilyFallback (List<String>?, optional): Fallback font families.
  • package (String?, optional): Package containing the font.
  • overflow (TextOverflow?, optional): How to handle text overflow.

Returns: Widget — the modified text widget.

Implementation

@override
Widget call({
  Color? color,
  Color? backgroundColor,
  double? fontSize,
  FontWeight? fontWeight,
  FontStyle? fontStyle,
  double? letterSpacing,
  double? wordSpacing,
  TextBaseline? textBaseline,
  double? height,
  TextLeadingDistribution? leadingDistribution,
  Locale? locale,
  Paint? foreground,
  Paint? background,
  List<Shadow>? shadows,
  List<FontFeature>? fontFeatures,
  List<FontVariation>? fontVariations,
  TextDecoration? decoration,
  Color? decorationColor,
  TextDecorationStyle? decorationStyle,
  double? decorationThickness,
  String? debugLabel,
  String? fontFamily,
  List<String>? fontFamilyFallback,
  String? package,
  TextOverflow? overflow,
}) {
  return copyWithStyle(
    (context, theme) => TextStyle(
      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,
    ),
  );
}