encodeFloatingLabelBehavior static method

String? encodeFloatingLabelBehavior(
  1. FloatingLabelBehavior? value
)

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

  • always
  • auto
  • never

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

Implementation

static String? encodeFloatingLabelBehavior(FloatingLabelBehavior? value) {
  String? result;

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

      case FloatingLabelBehavior.auto:
        result = 'auto';
        break;

      case FloatingLabelBehavior.never:
        result = 'never';
        break;
    }
  }

  return result;
}