From f53aa7cd01753fb270381e9f1f5d9ba6d0ccc646 Mon Sep 17 00:00:00 2001 From: jantunesmesias Date: Thu, 22 Aug 2024 11:14:03 -0300 Subject: [PATCH] WIP --- lib/pages/home_page/home_page_widget.dart | 2 +- lib/shared/utils/dialog_util.dart | 9 +++++---- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/lib/pages/home_page/home_page_widget.dart b/lib/pages/home_page/home_page_widget.dart index b663358f..5e459008 100644 --- a/lib/pages/home_page/home_page_widget.dart +++ b/lib/pages/home_page/home_page_widget.dart @@ -52,7 +52,7 @@ class _HomePageWidgetState extends State { AppState().provisional = value.jsonBody['provisional']; } else { await DialogUtil.warningDefault(context) - .whenComplete(() => safeSetState(() {})); + .then((value) => log('Erro ao buscar dados')); } }); }(); diff --git a/lib/shared/utils/dialog_util.dart b/lib/shared/utils/dialog_util.dart index beeecbe2..6804443a 100644 --- a/lib/shared/utils/dialog_util.dart +++ b/lib/shared/utils/dialog_util.dart @@ -16,10 +16,11 @@ class DialogUtil { static Future warningDefault(BuildContext context) { return warning( - context, - FFLocalizations.of(context).getVariableText( - ptText: "Atenção, algo deu errado. Tente novamente mais tarde.", - enText: "Warning, something went wrong. Try again later.")); + context, + FFLocalizations.of(context).getVariableText( + ptText: "Atenção, algo deu errado. Tente novamente mais tarde.", + enText: "Warning, something went wrong. Try again later.")) + .then((value) => value); } static Future error(BuildContext context, String message) async {