password property
latefinal
TextFieldState of the UserPassword input.
Implementation
late final TextFieldState password = TextFieldState(
onChanged: (s) => s.error.value = null,
onSubmitted: (s) async {
final password = UserPassword.tryParse(s.text);
if (password == null) {
s.error.value = 'err_wrong_password'.l10n;
} else {
s.editable.value = false;
s.status.value = RxStatus.loading();
try {
await _myUserService.deleteUserEmail(email, password: password);
pop?.call();
s.clear();
} on DeleteUserEmailException catch (e) {
s.error.value = e.toMessage();
} catch (e) {
s.resubmitOnError.value = true;
s.error.value = 'err_data_transfer'.l10n;
s.unsubmit();
rethrow;
} finally {
s.editable.value = true;
s.status.value = RxStatus.empty();
}
}
},
);