chore: Follow up loading dialog
This commit is contained in:
parent
18d4a5d39a
commit
46d62fdf11
1 changed files with 23 additions and 6 deletions
|
|
@ -95,14 +95,31 @@ class LoadingDialogState<T> extends State<LoadingDialog> {
|
||||||
: widget.title ?? L10n.of(context).loadingPleaseWait;
|
: widget.title ?? L10n.of(context).loadingPleaseWait;
|
||||||
|
|
||||||
return AlertDialog.adaptive(
|
return AlertDialog.adaptive(
|
||||||
title: Icon(
|
title: exception == null
|
||||||
Icons.error_outline_outlined,
|
? null
|
||||||
color: Theme.of(context).colorScheme.error,
|
: Icon(
|
||||||
size: 48,
|
Icons.error_outline_outlined,
|
||||||
),
|
color: Theme.of(context).colorScheme.error,
|
||||||
|
size: 48,
|
||||||
|
),
|
||||||
content: ConstrainedBox(
|
content: ConstrainedBox(
|
||||||
constraints: const BoxConstraints(maxWidth: 256),
|
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
|
actions: exception == null
|
||||||
? null
|
? null
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue