@@ -23,51 +23,39 @@ class ErrorView extends StatelessWidget {
23
23
return Padding (
24
24
padding: const EdgeInsets .all (kPagePadding),
25
25
child: Column (
26
+ mainAxisAlignment: MainAxisAlignment .center,
27
+ mainAxisSize: MainAxisSize .min,
26
28
children: [
27
29
const Spacer (),
28
- Flexible (
29
- flex: 2 ,
30
- child: Row (
31
- mainAxisAlignment: MainAxisAlignment .center,
32
- children: [
33
- SvgPicture .asset ('assets/error.svg' ),
34
- Column (
35
- mainAxisAlignment: MainAxisAlignment .center,
36
- crossAxisAlignment: CrossAxisAlignment .start,
37
- mainAxisSize: MainAxisSize .min,
38
- children: [
39
- Text (
40
- message.title (l10n),
41
- style: Theme .of (context).textTheme.titleMedium,
42
- ),
43
- Flexible (child: Text (message.body (l10n))),
44
- const SizedBox (height: kPagePadding),
45
- if (message.actions.isNotEmpty) ...[
46
- Flexible (child: Text (message.actionLabel (l10n))),
47
- const SizedBox (height: kPagePadding),
48
- ],
49
- Row (
50
- children: [
51
- if (message.actions.contains (ErrorAction .retry))
52
- OutlinedButton (
53
- onPressed: onRetry,
54
- child: Text (
55
- UbuntuLocalizations .of (context).retryLabel,
56
- ),
57
- ),
58
- if (message.actions.contains (ErrorAction .checkStatus))
59
- OutlinedButton (
60
- onPressed: () => launchUrlString (statusUrl),
61
- child: Text (l10n.errorViewCheckStatusLabel),
62
- ),
63
- ].separatedBy (const SizedBox (width: 10 )),
64
- ),
65
- ],
30
+ SvgPicture .asset ('assets/error.svg' ),
31
+ Text (
32
+ message.title (l10n),
33
+ style: Theme .of (context).textTheme.titleLarge,
34
+ ),
35
+ const SizedBox (height: kPagePadding),
36
+ Flexible (child: Text (message.body (l10n))),
37
+ if (message.actions.isNotEmpty) ...[
38
+ Flexible (child: Text (message.actionLabel (l10n))),
39
+ const SizedBox (height: kPagePadding),
40
+ ],
41
+ Row (
42
+ mainAxisSize: MainAxisSize .min,
43
+ children: [
44
+ if (message.actions.contains (ErrorAction .retry))
45
+ OutlinedButton (
46
+ onPressed: onRetry,
47
+ child: Text (
48
+ UbuntuLocalizations .of (context).retryLabel,
49
+ ),
50
+ ),
51
+ if (message.actions.contains (ErrorAction .checkStatus))
52
+ OutlinedButton (
53
+ onPressed: () => launchUrlString (statusUrl),
54
+ child: Text (l10n.errorViewCheckStatusLabel),
66
55
),
67
- ],
68
- ),
56
+ ].separatedBy (const SizedBox (width: 10 )),
69
57
),
70
- const Spacer (flex: 5 ),
58
+ const Spacer (flex: 3 ),
71
59
],
72
60
),
73
61
);
0 commit comments