BorderedText constructor

BorderedText({
  1. required Text child,
  2. StrokeCap strokeCap = StrokeCap.round,
  3. StrokeJoin strokeJoin = StrokeJoin.round,
  4. double strokeWidth = 6.0,
  5. Color strokeColor = const Color.fromRGBO(53, 0, 71, 1),
})

创建带边框的文本组件

child:要应用边框效果的原始文本组件(必须包含style属性) strokeCap:线段末端的绘制样式,可选butt/round/square,默认round strokeJoin:线段连接处的绘制样式,可选miter/round/bevel,默认round strokeWidth:边框宽度(单位:逻辑像素),默认6.0 strokeColor:边框颜色,默认值Color.fromRGBO(53, 0, 71, 1)

Implementation

BorderedText({
  required this.child,
  this.strokeCap = StrokeCap.round,
  this.strokeJoin = StrokeJoin.round,
  this.strokeWidth = 6.0,
  this.strokeColor = const Color.fromRGBO(53, 0, 71, 1),
});