getFloatingLabelBehavior method

FloatingLabelBehavior? getFloatingLabelBehavior(
  1. String? value
)

Implementation

FloatingLabelBehavior? getFloatingLabelBehavior(String? value) {
  if (value == null || value.isEmpty) {
    return null;
  }

  switch (value) {
    case "always":
      return FloatingLabelBehavior.always;
    case "never":
      return FloatingLabelBehavior.never;
    default:
      return FloatingLabelBehavior.auto;
  }
}