underLine method

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

下划线

Implementation

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