From 10eb719ade5d9b26eb7726daa50752523d4bf1d5 Mon Sep 17 00:00:00 2001 From: Rafal Rejek <42467911+Rejfi@users.noreply.github.com> Date: Sat, 25 Jan 2025 21:01:39 +0100 Subject: [PATCH] Show generic message instead of exact error message --- lib/l10n/app_pl.arb | 4 +++- lib/widgets/my_error_widget.dart | 3 ++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/lib/l10n/app_pl.arb b/lib/l10n/app_pl.arb index 8c68f970..a23de701 100644 --- a/lib/l10n/app_pl.arb +++ b/lib/l10n/app_pl.arb @@ -303,5 +303,7 @@ "lodge": "Portiernia", "dressing_room": "Szatnia", "no_lodge_in_the_building": "W tym budynku nie ma portierni", - "no_dressing_room_in_the_building": "W tym budynku nie ma szatni" + "no_dressing_room_in_the_building": "W tym budynku nie ma szatni", + + "generic_error_message": "Upsss...Coś poszło nie tak" } diff --git a/lib/widgets/my_error_widget.dart b/lib/widgets/my_error_widget.dart index 0ee7a628..bc473991 100644 --- a/lib/widgets/my_error_widget.dart +++ b/lib/widgets/my_error_widget.dart @@ -13,6 +13,7 @@ import "../features/parkings_view/api_client/iparking_commands.dart"; import "../features/parkings_view/widgets/offline_parkings_view.dart"; import "../gen/assets.gen.dart"; import "../theme/app_theme.dart"; +import "../utils/context_extensions.dart"; class MyErrorWidget extends HookWidget { const MyErrorWidget(this.error, {super.key}); @@ -53,7 +54,7 @@ class MyErrorWidget extends HookWidget { child: Text( textAlign: TextAlign.center, style: context.textTheme.headline, - error.toString(), + context.localize.generic_error_message, ), ), ],