encodeTabAlignment static method

String? encodeTabAlignment(
  1. TabAlignment? value
)

Encodes the given value to the String representation. Supported values are:

  • center
  • fill
  • start
  • startOffset

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

Implementation

static String? encodeTabAlignment(TabAlignment? value) {
  String? result;

  if (value != null) {
    switch (value) {
      case TabAlignment.center:
        result = 'center';
        break;
      case TabAlignment.fill:
        result = 'fill';
        break;
      case TabAlignment.start:
        result = 'start';
        break;
      case TabAlignment.startOffset:
        result = 'startOffset';
        break;
    }
  }

  return _stripDynamicNull(result);
}