fix: Bootstrap dialog

onboarding
Christian Pauly 4 years ago
parent 1e08e58169
commit 8e324a01d6

@ -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…
Cancel
Save