style method

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

Implementation

TextStyle style({
  Color? color,
  Color? backgroundColor,
  double? fontSize,
  FontWeight? fontWeight,
  FontStyle? fontStyle,
  String? fontFamily,
  String? googleFont,
  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,
  TextOverflow? overflow,
}) {
  return googleFont != null || Figma.instance.defaultFontFamily != null
      ? GoogleFonts.getFont(googleFont ?? Figma.instance.defaultFontFamily!,
          color: color ?? Figma.instance.defaultTextColor,
          backgroundColor: backgroundColor,
          fontSize: fontSize,
          fontWeight: fontWeight ?? Figma.instance.defaultFontWeight,
          fontStyle: fontStyle,
          letterSpacing: letterSpacing,
          wordSpacing: wordSpacing,
          textBaseline: textBaseline,
          height: height,
          locale: locale,
          foreground: foreground,
          background: background,
          shadows: shadows,
          fontFeatures: fontFeatures,
          decoration: decoration,
          decorationColor: decorationColor,
          decorationStyle: decorationStyle,
          decorationThickness: decorationThickness)
      : TextStyle(
          color: color,
          fontFamily: Figma.instance.defaultCustomFontFamily ?? fontFamily,
          backgroundColor: backgroundColor,
          fontSize: fontSize,
          fontWeight: fontWeight,
          fontStyle: fontStyle,
          letterSpacing: letterSpacing,
          wordSpacing: wordSpacing,
          textBaseline: textBaseline,
          height: height,
          locale: locale,
          foreground: foreground,
          background: background,
          shadows: shadows,
          fontFeatures: fontFeatures,
          decoration: decoration,
          decorationColor: decorationColor,
          decorationStyle: decorationStyle,
          decorationThickness: decorationThickness,
          overflow: overflow);
}