This commit is contained in:
jantunesmesias 2024-08-22 11:14:03 -03:00
parent 55dfa5fc94
commit f53aa7cd01
2 changed files with 6 additions and 5 deletions

View File

@ -52,7 +52,7 @@ class _HomePageWidgetState extends State<HomePageWidget> {
AppState().provisional = value.jsonBody['provisional']; AppState().provisional = value.jsonBody['provisional'];
} else { } else {
await DialogUtil.warningDefault(context) await DialogUtil.warningDefault(context)
.whenComplete(() => safeSetState(() {})); .then((value) => log('Erro ao buscar dados'));
} }
}); });
}(); }();

View File

@ -16,10 +16,11 @@ class DialogUtil {
static Future<dynamic> warningDefault(BuildContext context) { static Future<dynamic> warningDefault(BuildContext context) {
return warning( return warning(
context, context,
FFLocalizations.of(context).getVariableText( FFLocalizations.of(context).getVariableText(
ptText: "Atenção, algo deu errado. Tente novamente mais tarde.", ptText: "Atenção, algo deu errado. Tente novamente mais tarde.",
enText: "Warning, something went wrong. Try again later.")); enText: "Warning, something went wrong. Try again later."))
.then((value) => value);
} }
static Future<dynamic> error(BuildContext context, String message) async { static Future<dynamic> error(BuildContext context, String message) async {