From 8574bcad19ae7a9bd4403bf8644f3601989792bb Mon Sep 17 00:00:00 2001 From: Roland Geider Date: Sun, 7 Sep 2025 15:25:50 +0200 Subject: [PATCH] Allow the error widget to scroll for longer error messages --- lib/helpers/errors.dart | 40 +++++++++++++++++++++++++--------------- 1 file changed, 25 insertions(+), 15 deletions(-) diff --git a/lib/helpers/errors.dart b/lib/helpers/errors.dart index 4a4a22de3..971921626 100644 --- a/lib/helpers/errors.dart +++ b/lib/helpers/errors.dart @@ -363,14 +363,19 @@ class FormHttpErrorsWidget extends StatelessWidget { @override Widget build(BuildContext context) { - return Column( - children: [ - Icon(Icons.error_outline, color: Theme.of(context).colorScheme.error), - ...formatApiErrors( - extractErrors(exception.errors), - color: Theme.of(context).colorScheme.error, + return Container( + constraints: const BoxConstraints(maxHeight: 250), + child: SingleChildScrollView( + child: Column( + children: [ + Icon(Icons.error_outline, color: Theme.of(context).colorScheme.error), + ...formatApiErrors( + extractErrors(exception.errors), + color: Theme.of(context).colorScheme.error, + ), + ], ), - ], + ), ); } } @@ -383,15 +388,20 @@ class GeneralErrorsWidget extends StatelessWidget { @override Widget build(BuildContext context) { - return Column( - children: [ - Icon(Icons.error_outline, color: Theme.of(context).colorScheme.error), - ...formatTextErrors( - widgets, - title: title, - color: Theme.of(context).colorScheme.error, + return Container( + constraints: const BoxConstraints(maxHeight: 250), + child: SingleChildScrollView( + child: Column( + children: [ + Icon(Icons.error_outline, color: Theme.of(context).colorScheme.error), + ...formatTextErrors( + widgets, + title: title, + color: Theme.of(context).colorScheme.error, + ), + ], ), - ], + ), ); } }