mirror of
https://gitlab.com/famedly/fluffychat.git
synced 2024-11-27 23:09:35 +01:00
fix: Bootstrap dialog
This commit is contained in:
parent
8fcdd4236a
commit
16c2249483
@ -69,7 +69,9 @@ class _BootstrapDialogState extends State<BootstrapDialog> {
|
|||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
_wipe ??= widget.wipe;
|
_wipe ??= widget.wipe;
|
||||||
final buttons = <AdaptiveFlatButton>[];
|
final buttons = <AdaptiveFlatButton>[];
|
||||||
Widget body = LinearProgressIndicator();
|
Widget body = PlatformInfos.isCupertinoStyle
|
||||||
|
? CupertinoActivityIndicator()
|
||||||
|
: LinearProgressIndicator();
|
||||||
titleText = L10n.of(context).loadingPleaseWait;
|
titleText = L10n.of(context).loadingPleaseWait;
|
||||||
|
|
||||||
if (bootstrap == null) {
|
if (bootstrap == null) {
|
||||||
@ -236,11 +238,7 @@ class _BootstrapDialogState extends State<BootstrapDialog> {
|
|||||||
case BootstrapState.askBadSsss:
|
case BootstrapState.askBadSsss:
|
||||||
case BootstrapState.error:
|
case BootstrapState.error:
|
||||||
titleText = L10n.of(context).oopsSomethingWentWrong;
|
titleText = L10n.of(context).oopsSomethingWentWrong;
|
||||||
body = ListTile(
|
body = Icon(Icons.error_outline, color: Colors.red, size: 40);
|
||||||
contentPadding: EdgeInsets.zero,
|
|
||||||
leading: Icon(Icons.error_outline, color: Colors.red),
|
|
||||||
title: Text(L10n.of(context).oopsSomethingWentWrong),
|
|
||||||
);
|
|
||||||
buttons.add(AdaptiveFlatButton(
|
buttons.add(AdaptiveFlatButton(
|
||||||
label: L10n.of(context).close,
|
label: L10n.of(context).close,
|
||||||
onPressed: () =>
|
onPressed: () =>
|
||||||
@ -249,10 +247,12 @@ class _BootstrapDialogState extends State<BootstrapDialog> {
|
|||||||
break;
|
break;
|
||||||
case BootstrapState.done:
|
case BootstrapState.done:
|
||||||
titleText = L10n.of(context).everythingReady;
|
titleText = L10n.of(context).everythingReady;
|
||||||
body = ListTile(
|
body = Column(
|
||||||
contentPadding: EdgeInsets.zero,
|
mainAxisSize: MainAxisSize.min,
|
||||||
leading: Icon(Icons.check_circle, color: Colors.green),
|
children: [
|
||||||
title: Text(L10n.of(context).keysCached),
|
Icon(Icons.check_circle, color: Colors.green, size: 40),
|
||||||
|
Text(L10n.of(context).keysCached),
|
||||||
|
],
|
||||||
);
|
);
|
||||||
buttons.add(AdaptiveFlatButton(
|
buttons.add(AdaptiveFlatButton(
|
||||||
label: L10n.of(context).close,
|
label: L10n.of(context).close,
|
||||||
|
Loading…
Reference in New Issue
Block a user