textStyle method

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

Implementation

DefaultTextStyle textStyle({
  TextStyle? style,
  inherit = true,
  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,
}) {
  if (style == null) {
    return DefaultTextStyle(
      style: TextStyle(
        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,
      ),
      child: this,
    );
  }
  return DefaultTextStyle(
    style: style,
    child: this,
  );
}