Skip to content

Commit ed662fe

Browse files
committed
feat(widgets): update error card style
1 parent 839a398 commit ed662fe

File tree

3 files changed

+4
-10
lines changed

3 files changed

+4
-10
lines changed

lib/features/forum/view/forum_page.dart

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -314,10 +314,7 @@ class _ForumPageState extends State<ForumPage> with SingleTickerProviderStateMix
314314
);
315315
} else if (!state.havePermission) {
316316
if (state.permissionDeniedMessage != null) {
317-
return ErrorCard(
318-
message: context.t.general.noPermission,
319-
child: munchElement(context, state.permissionDeniedMessage!),
320-
);
317+
return ErrorCard(child: munchElement(context, state.permissionDeniedMessage!));
321318
} else {
322319
return Center(child: Text(context.t.general.noPermission));
323320
}

lib/features/thread/v1/view/thread_page.dart

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -299,10 +299,7 @@ class _ThreadPageState extends State<ThreadPage> with SingleTickerProviderStateM
299299
);
300300
} else if (!state.havePermission) {
301301
if (state.permissionDeniedMessage != null) {
302-
return ErrorCard(
303-
message: context.t.general.noPermission,
304-
child: munchElement(context, state.permissionDeniedMessage!),
305-
);
302+
return ErrorCard(child: munchElement(context, state.permissionDeniedMessage!));
306303
} else {
307304
return Center(child: Text(context.t.general.noPermission));
308305
}

lib/widgets/card/error_card.dart

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ class ErrorCard extends StatelessWidget {
2828
child: Card(
2929
margin: EdgeInsets.zero,
3030
child: Padding(
31-
padding: edgeInsetsL12T12R12B12,
31+
padding: edgeInsetsL24T24R24B24,
3232
child: Column(
3333
mainAxisSize: MainAxisSize.min,
3434
children: [
@@ -42,7 +42,7 @@ class ErrorCard extends StatelessWidget {
4242
style: Theme.of(context).textTheme.bodyMedium?.copyWith(color: Theme.of(context).colorScheme.outline),
4343
),
4444
Center(child: child),
45-
].insertBetween(sizedBoxW24H24),
45+
].insertBetween(sizedBoxW12H12),
4646
),
4747
),
4848
),

0 commit comments

Comments
 (0)