isObscureOrPlainText method

bool isObscureOrPlainText()

whether to show the content as plain text or obscure

Implementation

bool isObscureOrPlainText() {
  if (widget.isPassword()) {
    return widget._controller.obscured ?? true;
  } else {
    return widget._controller.obscureText == true &&
        (widget._controller.obscured ?? true);
  }
}