resolveTextDecorationLine static method

TextDecoration resolveTextDecorationLine(
  1. String present
)

In CSS2.1, text-decoration determin the type of text decoration, but in CSS3, which is text-decoration-line.

Implementation

static TextDecoration resolveTextDecorationLine(String present) {
  switch (present) {
    case 'line-through':
      return TextDecoration.lineThrough;
    case 'overline':
      return TextDecoration.overline;
    case 'underline':
      return TextDecoration.underline;
    case 'none':
    default:
      return TextDecoration.none;
  }
}