Skip to content

Commit

Permalink
feat(error handling): adjust error screen content (#558)
Browse files Browse the repository at this point in the history
* Show generic message instead of exact error message

* Make text a little bit bigger
  • Loading branch information
Rejfi authored and mmzek committed Jan 26, 2025
1 parent 3e990b6 commit 0aad72d
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
1 change: 1 addition & 0 deletions lib/l10n/app_pl.arb
Original file line number Diff line number Diff line change
Expand Up @@ -304,5 +304,6 @@
"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",
"generic_error_message": "Upsss...Coś poszło nie tak",
"navigate_to_building" : "Nawiguj do budynku"
}
5 changes: 3 additions & 2 deletions 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 @@ -52,8 +53,8 @@ class MyErrorWidget extends HookWidget {
Align(
child: Text(
textAlign: TextAlign.center,
style: context.textTheme.headline,
error.toString(),
style: context.textTheme.headline.copyWith(fontSize: 25),
context.localize.generic_error_message,
),
),
],
Expand Down

0 comments on commit 0aad72d

Please sign in to comment.