Skip to content

Commit

Permalink
Show generic message instead of exact error message
Browse files Browse the repository at this point in the history
  • Loading branch information
Rejfi committed Jan 25, 2025
1 parent 3a66dac commit 10eb719
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
4 changes: 3 additions & 1 deletion lib/l10n/app_pl.arb
Original file line number Diff line number Diff line change
Expand Up @@ -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"
}
3 changes: 2 additions & 1 deletion lib/widgets/my_error_widget.dart
Original file line number Diff line number Diff line change
Expand Up @@ -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});
Expand Down Expand Up @@ -53,7 +54,7 @@ class MyErrorWidget extends HookWidget {
child: Text(
textAlign: TextAlign.center,
style: context.textTheme.headline,
error.toString(),
context.localize.generic_error_message,
),
),
],
Expand Down

0 comments on commit 10eb719

Please sign in to comment.