make method

  1. @override
Widget make({
  1. Key? key,
})

Implementation

@override
Widget make({Key? key}) {
  if (!willRender) {
    return const VxNone();
  }
  final sdw = [
    Shadow(
        blurRadius: _shadowBlur, color: _shadowColor, offset: _shadowOffset)
  ];

  final ts = TextStyle(
      color: velocityColor,
      fontSize: _fontSize,
      fontStyle: _fontStyle,
      fontFamily: _fontFamily,
      fontWeight: _fontWeight,
      letterSpacing: _letterSpacing,
      decoration: _decoration,
      height: _lineHeight,
      textBaseline: _textBaseline ?? TextBaseline.alphabetic,
      wordSpacing: _wordSpacing,
      shadows: _shadowBlur > 0 ? sdw : null);

  final textWidget = _isIntrinsic
      ? Text(
          _text!,
          key: key,
          textAlign: _textAlign,
          maxLines: _maxLines,
          textScaleFactor: _scaleFactor,
          style: _themedStyle?.merge(ts) ?? _textStyle?.merge(ts) ?? ts,
          softWrap: _softWrap ?? true,
          overflow: _overflow ?? TextOverflow.clip,
          strutStyle: _strutStyle,
        )
      : AutoSizeText(
          _text!,
          key: key,
          textAlign: _textAlign,
          maxLines: _maxLines,
          textScaleFactor: _scaleFactor,
          style: _themedStyle?.merge(ts) ?? _textStyle?.merge(ts) ?? ts,
          softWrap: _softWrap ?? true,
          minFontSize: _minFontSize ?? 12,
          maxFontSize: _maxFontSize ?? double.infinity,
          stepGranularity: _stepGranularity ?? 1,
          overflowReplacement: _replacement,
          overflow: _overflow ?? TextOverflow.clip,
          strutStyle: _strutStyle,
          wrapWords: _wrapWords ?? true,
        );

  return textWidget;
}