encodeTextOverflow static method

String? encodeTextOverflow(
  1. TextOverflow? value
)

Encodes the value into a String representation. Supported values are:

  • clip
  • ellipsis
  • fade
  • visible

All other values, including null, will result in null.

Implementation

static String? encodeTextOverflow(TextOverflow? value) {
  String? result;

  if (value != null) {
    switch (value) {
      case TextOverflow.clip:
        result = 'clip';
        break;

      case TextOverflow.ellipsis:
        result = 'ellipsis';
        break;

      case TextOverflow.fade:
        result = 'fade';
        break;

      case TextOverflow.visible:
        result = 'visible';
        break;
    }
  }

  return result;
}