Skip to content

Commit

Permalink
chore: Follow up loading dialog
Browse files Browse the repository at this point in the history
  • Loading branch information
krille-chan committed Nov 19, 2024
1 parent 18d4a5d commit 46d62fd
Showing 1 changed file with 23 additions and 6 deletions.
29 changes: 23 additions & 6 deletions lib/widgets/future_loading_dialog.dart
Original file line number Diff line number Diff line change
Expand Up @@ -95,14 +95,31 @@ class LoadingDialogState<T> extends State<LoadingDialog> {
: widget.title ?? L10n.of(context).loadingPleaseWait;

return AlertDialog.adaptive(
title: Icon(
Icons.error_outline_outlined,
color: Theme.of(context).colorScheme.error,
size: 48,
),
title: exception == null
? null
: Icon(
Icons.error_outline_outlined,
color: Theme.of(context).colorScheme.error,
size: 48,
),
content: ConstrainedBox(
constraints: const BoxConstraints(maxWidth: 256),
child: Text(titleLabel),
child: Row(
crossAxisAlignment: CrossAxisAlignment.center,
children: [
if (exception == null) ...[
const CircularProgressIndicator.adaptive(),
const SizedBox(width: 20),
],
Expanded(
child: Text(
titleLabel,
textAlign: exception == null ? TextAlign.left : null,
overflow: TextOverflow.ellipsis,
),
),
],
),
),
actions: exception == null
? null
Expand Down

0 comments on commit 46d62fd

Please sign in to comment.