Skip to content

Commit

Permalink
fix: Height of exception widgets
Browse files Browse the repository at this point in the history
  • Loading branch information
Gustl22 committed Mar 7, 2024
1 parent 5d57411 commit fb62a31
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 11 deletions.
1 change: 1 addition & 0 deletions wrestling_scoreboard_client/lib/view/widgets/dialogs.dart
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@ Future<void> showExceptionDialog({required BuildContext context, required Except
context: context,
builder: (context) => OkDialog(
child: Column(
mainAxisSize: MainAxisSize.min,
children: [
if (exception is RestException) SelectableText(localizations.invalidParameterException),
SelectableText(
Expand Down
21 changes: 10 additions & 11 deletions wrestling_scoreboard_client/lib/view/widgets/exception.dart
Original file line number Diff line number Diff line change
Expand Up @@ -19,17 +19,16 @@ class ExceptionWidget extends StatelessWidget {
: SelectableText(exception.toString(), style: TextStyle(color: Theme.of(context).colorScheme.error));
return Center(
child: PaddedCard(
child: Wrap(children: [
Column(
mainAxisAlignment: MainAxisAlignment.center,
crossAxisAlignment: CrossAxisAlignment.center,
children: [
errorText,
if (onRetry != null) const SizedBox(height: 16),
if (onRetry != null) OutlinedButton(onPressed: onRetry, child: Text(AppLocalizations.of(context)!.retry))
],
),
]),
child: Column(
mainAxisSize: MainAxisSize.min,
mainAxisAlignment: MainAxisAlignment.center,
crossAxisAlignment: CrossAxisAlignment.center,
children: [
errorText,
if (onRetry != null) const SizedBox(height: 16),
if (onRetry != null) OutlinedButton(onPressed: onRetry, child: Text(AppLocalizations.of(context)!.retry))
],
),
),
);
}
Expand Down

0 comments on commit fb62a31

Please sign in to comment.