buildHintText static method

String? buildHintText(
  1. String? hintText, {
  2. String? labelText,
  3. bool? uppercase,
  4. bool readOnly = false,
})

Implementation

static String? buildHintText(String? hintText,
    {String? labelText, bool? uppercase, bool readOnly = false}) {
  var text = hintText ?? labelText;
  if (text == null) {
    return null;
  }
  if (readOnly) {
    return ' ';
  }

  if (uppercase == null)
    uppercase = FlickerConfiguration.displayOptions.uppercaseLabelAndHint;

  return uppercase ? text.toUpperCase() : text;
}