encodeFloatingLabelAlignment static method

String? encodeFloatingLabelAlignment(
  1. FloatingLabelAlignment? value
)

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

  • center
  • start

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

Implementation

static String? encodeFloatingLabelAlignment(FloatingLabelAlignment? value) {
  String? result;

  if (value != null) {
    if (value == FloatingLabelAlignment.center) {
      result = 'center';
    } else if (value == FloatingLabelAlignment.start) {
      result = 'start';
    }
  }

  return _stripDynamicNull(result);
}