encodeBoxHeightStyle static method

String? encodeBoxHeightStyle(
  1. BoxHeightStyle? value
)

Encodes the value to a String. Supported values are:

  • includeLineSpacingBottom
  • includeLineSpacingMiddle
  • includeLineSpacingTop
  • max
  • strut
  • tight

Implementation

static String? encodeBoxHeightStyle(BoxHeightStyle? value) {
  String? result;

  if (value != null) {
    switch (value) {
      case BoxHeightStyle.includeLineSpacingBottom:
        result = 'includeLineSpacingBottom';
        break;
      case BoxHeightStyle.includeLineSpacingMiddle:
        result = 'includeLineSpacingMiddle';
        break;
      case BoxHeightStyle.includeLineSpacingTop:
        result = 'includeLineSpacingTop';
        break;
      case BoxHeightStyle.max:
        result = 'max';
        break;
      case BoxHeightStyle.strut:
        result = 'strut';
        break;
      case BoxHeightStyle.tight:
        result = 'tight';
        break;
    }
  }

  return result;
}