mirror of
https://gitlab.com/comunic/comunicmobile
synced 2025-06-19 08:15:16 +00:00
Send answers back to the server
This commit is contained in:
@ -213,14 +213,26 @@ class _ResetPasswordBodyState extends SafeState<_ResetPasswordBody> {
|
||||
_canSubmitAnswers ? (s) => _submitSecurityAnswers() : null,
|
||||
decoration: InputDecoration(
|
||||
alignLabelWithHint: false,
|
||||
labelText: tr("Answer %num%", args: {"num": id.toString()})),
|
||||
labelText:
|
||||
tr("Answer %num%", args: {"num": (id + 1).toString()})),
|
||||
),
|
||||
_Spacer()
|
||||
],
|
||||
);
|
||||
|
||||
/// Submit security answers
|
||||
Future<void> _submitSecurityAnswers() async {}
|
||||
Future<void> _submitSecurityAnswers() async {
|
||||
_setLoading(true);
|
||||
try {
|
||||
final token = await AccountHelper.checkAnswers(_emailAddress, _answers);
|
||||
print(token);
|
||||
} catch (e, s) {
|
||||
print("Could not submit security answers! $e\n$s");
|
||||
showSimpleSnack(
|
||||
context, tr("Could not validate these security answers!"));
|
||||
}
|
||||
_setLoading(false);
|
||||
}
|
||||
}
|
||||
|
||||
class _Spacer extends StatelessWidget {
|
||||
|
Reference in New Issue
Block a user