toString method

  1. @override
String toString ()
override

Returns a string representation of this object.

Implementation

@override
String toString() {
  if (_mask == 0)
    return 'TextDecoration.none';
  final List<String> values = <String>[];
  if (_mask & underline._mask != 0)
    values.add('underline');
  if (_mask & overline._mask != 0)
    values.add('overline');
  if (_mask & lineThrough._mask != 0)
    values.add('lineThrough');
  if (values.length == 1)
    return 'TextDecoration.${values[0]}';
  return 'TextDecoration.combine([${values.join(", ")}])';
}