StrokeTextWidget constructor
StrokeTextWidget(
- String text, {
- Key? key,
- TextStyle textStyle = const TextStyle(color: Colors.white, fontSize: 16, fontWeight: FontWeight.w500, decoration: TextDecoration.none),
- RawLinearGradient? linearGradient,
- StrutStyle? strutStyle,
- double textScaleFactor = 1,
- double strokeWidth = 1,
- double minWidth = 0,
- double maxWidth = double.infinity,
- double opacity = 1,
- double textDecorationPadding = 0,
- int? maxLines,
- BoxDecoration? decoration,
- BoxDecoration? textDecoration,
- TextAlign textAlign = TextAlign.left,
- EdgeInsets padding = EdgeInsets.zero,
- Color strokeColor = const Color(0x80000000),
Implementation
StrokeTextWidget(
this.text, {
Key? key,
this.textStyle = const TextStyle(
color: Colors.white,
fontSize: 16,
fontWeight: FontWeight.w500,
decoration: TextDecoration.none,
),
RawLinearGradient? linearGradient,
StrutStyle? strutStyle,
double textScaleFactor = 1,
double strokeWidth = 1,
double minWidth = 0,
double maxWidth = double.infinity,
double opacity = 1,
double textDecorationPadding = 0,
int? maxLines,
BoxDecoration? decoration,
BoxDecoration? textDecoration,
TextAlign textAlign = TextAlign.left,
EdgeInsets padding = EdgeInsets.zero,
Color strokeColor = const Color(0x80000000),
}) : _strokeTextPainter = _StrokeTextPainter(
text,
minWidth: minWidth,
maxWidth: maxWidth,
textDecorationPadding: textDecorationPadding,
textStyle: textStyle,
strutStyle: strutStyle,
linearGradient: linearGradient,
maxLines: maxLines,
textScaleFactor: textScaleFactor,
strokeWidth: strokeWidth,
strokeColor: strokeColor,
decoration: decoration,
textDecoration: textDecoration,
textAlign: textAlign,
padding: padding,
opacity: opacity,
),
super(key: key);