Skip to content

Commit 3675696

Browse files
committed
Teams #43
1 parent 88ec8ca commit 3675696

File tree

1 file changed

+41
-38
lines changed

1 file changed

+41
-38
lines changed

lib/src/ui/codelessly_error_screen.dart

+41-38
Original file line numberDiff line numberDiff line change
@@ -78,50 +78,53 @@ class CodelesslyErrorScreen extends StatelessWidget {
7878
message =
7979
'An unexpected error happened!${exception != null ? '\n$exception' : ''}';
8080
}
81-
return FittedBox(
82-
fit: BoxFit.scaleDown,
83-
child: Column(
84-
mainAxisSize: MainAxisSize.min,
85-
children: [
86-
Text(
87-
'Uh oh!',
88-
style: Theme.of(context).textTheme.titleLarge,
89-
),
90-
const SizedBox(height: 16),
91-
if (title != null) ...[
81+
return Padding(
82+
padding: const EdgeInsets.all(16),
83+
child: FittedBox(
84+
fit: BoxFit.scaleDown,
85+
child: Column(
86+
mainAxisSize: MainAxisSize.min,
87+
children: [
9288
Text(
93-
title,
94-
style: Theme.of(context).textTheme.titleMedium,
89+
'Uh oh!',
90+
style: Theme.of(context).textTheme.titleLarge,
9591
),
9692
const SizedBox(height: 16),
97-
],
98-
Container(
99-
padding: const EdgeInsets.symmetric(horizontal: 24),
100-
constraints: const BoxConstraints(maxWidth: 500, maxHeight: 500),
101-
child: SingleChildScrollView(
102-
primary: false,
103-
padding: EdgeInsets.zero,
104-
child: SelectionArea(
105-
child: Column(
106-
children: [
107-
Text(
108-
message,
109-
textAlign: TextAlign.left,
110-
style: Theme.of(context).textTheme.bodyMedium,
111-
),
112-
if (exception case CodelesslyException ex)
113-
if (ex.originalException != null)
114-
Text(
115-
ex.originalException.toString(),
116-
textAlign: TextAlign.left,
117-
style: Theme.of(context).textTheme.bodyMedium,
118-
),
119-
],
93+
if (title != null) ...[
94+
Text(
95+
title,
96+
style: Theme.of(context).textTheme.titleMedium,
97+
),
98+
const SizedBox(height: 16),
99+
],
100+
Container(
101+
padding: const EdgeInsets.symmetric(horizontal: 8),
102+
constraints: const BoxConstraints(maxWidth: 500, maxHeight: 500),
103+
child: SingleChildScrollView(
104+
primary: false,
105+
padding: EdgeInsets.zero,
106+
child: SelectionArea(
107+
child: Column(
108+
children: [
109+
Text(
110+
message,
111+
textAlign: TextAlign.left,
112+
style: Theme.of(context).textTheme.bodyMedium,
113+
),
114+
if (exception case CodelesslyException ex)
115+
if (ex.originalException != null)
116+
Text(
117+
ex.originalException.toString(),
118+
textAlign: TextAlign.left,
119+
style: Theme.of(context).textTheme.bodyMedium,
120+
),
121+
],
122+
),
120123
),
121124
),
122125
),
123-
),
124-
],
126+
],
127+
),
125128
),
126129
);
127130
}

0 commit comments

Comments
 (0)