Skip to content

Commit

Permalink
fix(#60): Adiciona mensagem recover_account_view.dart
Browse files Browse the repository at this point in the history
  • Loading branch information
Yasm1nNasc1mento committed Dec 27, 2024
1 parent 5e28b25 commit 3c711ca
Showing 1 changed file with 14 additions and 7 deletions.
21 changes: 14 additions & 7 deletions lib/ui/recover_account/view/recover_account_view.dart
Original file line number Diff line number Diff line change
Expand Up @@ -55,14 +55,21 @@ class RecoverAccountScreen extends StatelessWidget {
width: 291,
height: 64,
child: ElevatedButton(
onPressed: () {
viewModel.forgetPassword().then((value) {
onPressed: () async {
try {
await viewModel.forgetPassword();
Log.d("Deu certo!");
}).catchError((e) => showDialog<Object>(
context: context,
builder: (BuildContext context) =>
ErrorPopUp(content: Text('$e')),
));
ScaffoldMessenger.of(context).showSnackBar(
const SnackBar(
content: Text('Estamos quase lá! Confira seu e-mail para redefinir sua senha.')),
);
} catch (e) {
showDialog<Object>(
context: context,
builder: (BuildContext context) =>
ErrorPopUp(content: Text('$e')),
);
}
},
child: viewModel.isLoading
? const CircularProgressIndicator(value: null)
Expand Down

0 comments on commit 3c711ca

Please sign in to comment.