isObscureText method

bool isObscureText(
  1. String attribute
)

Determines whether the text input associated with a specific attribute should be displayed in obscured (password) mode or not.

Parameters:

  • attribute: The name of the attribute for which to determine the text display mode.

Returns:

  • true if the text input should be displayed in obscured (password) mode.
  • false if the text input should be displayed in plain text mode.

Description: This function checks if the specified attribute is in the _overrideObscureText list. If it is, it returns false, indicating that the text should be displayed in plain text mode (not obscured). If the attribute is not in the list, it checks the obscureText property of the attribute's type to determine whether the text should be obscured based on its predefined behavior.

Implementation

bool isObscureText(String attribute) {
  if (_overrideObscureText.contains((attribute))) {
    return false;
  }
  return getAttributeType(attribute).obscureText;
}