strikethrough method

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

删除线

Implementation

TextField 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);
}