@@ -78,50 +78,53 @@ class CodelesslyErrorScreen extends StatelessWidget {
78
78
message =
79
79
'An unexpected error happened!${exception != null ? '\n $exception ' : '' }' ;
80
80
}
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: [
92
88
Text (
93
- title ,
94
- style: Theme .of (context).textTheme.titleMedium ,
89
+ 'Uh oh!' ,
90
+ style: Theme .of (context).textTheme.titleLarge ,
95
91
),
96
92
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
+ ),
120
123
),
121
124
),
122
125
),
123
- ) ,
124
- ] ,
126
+ ] ,
127
+ ) ,
125
128
),
126
129
);
127
130
}
0 commit comments