setObscurity method
Use this function to set controller's obscurity value using the unique id you supplied earlier!
{@tool snippet}
onPressed: () {
//* Set controller obscurity value
_formController.setsetObscurity("id1", true)
}
{@end-tool}
Implementation
void setObscurity(String id, bool isObscure) {
if (_textControllers.containsKey(id) && _textControllers[id] != null) {
_obscurity[id] = isObscure;
} else {
throw Exception(
"No controllers found with the provided id, Did you create a controller with this id? Did you wait for the controller to initializ?");
}
}