strikethrough method

Text strikethrough({
  1. bool active = true,
  2. Color? color,
})

删除线

Implementation

Text strikethrough({bool active = true, Color? color}) {
  var newStyle = TextStyle(
      decoration: active == true ? TextDecoration.lineThrough : TextDecoration.none,
      decorationColor: color);
  return copyWith(style: style?.merge(newStyle) ?? newStyle);
}