No trecho abaixo:
void _save(Transaction transactionCreated, String password, BuildContext context) async {
_webClient.save(transactionCreated, password).then((transaction) {
if(transaction != null){
Navigator.pop(context);
}
}).catchError((e) {
showDialog(context: context, builder: (contextDialog) {
return FailureDialog(e.message);
});
}, test: (e) => e is Exception);
}
qual é a diferença real entre o parâmetro test
usado na aula, ou tipar o .catchError()
confome abaixo?
void _save(Transaction transactionCreated, String password, BuildContext context) async {
_webClient.save(transactionCreated, password).then((transaction) {
if(transaction != null){
Navigator.pop(context);
}
}).catchError((Exception e) {
showDialog(context: context, builder: (contextDialog) {
return FailureDialog(e.message);
});
});
}