전역 구조 리팩터링 및 테스트 확장
This commit is contained in:
@@ -35,15 +35,8 @@ class AppLayout extends StatelessWidget {
|
||||
_BreadcrumbBar(items: breadcrumbs),
|
||||
const SizedBox(height: 16),
|
||||
],
|
||||
PageHeader(
|
||||
title: title,
|
||||
subtitle: subtitle,
|
||||
actions: actions,
|
||||
),
|
||||
if (toolbar != null) ...[
|
||||
const SizedBox(height: 16),
|
||||
toolbar!,
|
||||
],
|
||||
PageHeader(title: title, subtitle: subtitle, actions: actions),
|
||||
if (toolbar != null) ...[const SizedBox(height: 16), toolbar!],
|
||||
const SizedBox(height: 24),
|
||||
child,
|
||||
],
|
||||
@@ -54,11 +47,7 @@ class AppLayout extends StatelessWidget {
|
||||
}
|
||||
|
||||
class AppBreadcrumbItem {
|
||||
const AppBreadcrumbItem({
|
||||
required this.label,
|
||||
this.path,
|
||||
this.onTap,
|
||||
});
|
||||
const AppBreadcrumbItem({required this.label, this.path, this.onTap});
|
||||
|
||||
final String label;
|
||||
final String? path;
|
||||
@@ -94,7 +83,10 @@ class _BreadcrumbBar extends StatelessWidget {
|
||||
size: 14,
|
||||
color: colorScheme.mutedForeground,
|
||||
),
|
||||
_BreadcrumbChip(item: items[index], isLast: index == items.length - 1),
|
||||
_BreadcrumbChip(
|
||||
item: items[index],
|
||||
isLast: index == items.length - 1,
|
||||
),
|
||||
],
|
||||
],
|
||||
);
|
||||
@@ -113,7 +105,9 @@ class _BreadcrumbChip extends StatelessWidget {
|
||||
final label = Text(
|
||||
item.label,
|
||||
style: theme.textTheme.small.copyWith(
|
||||
color: isLast ? theme.colorScheme.foreground : theme.colorScheme.mutedForeground,
|
||||
color: isLast
|
||||
? theme.colorScheme.foreground
|
||||
: theme.colorScheme.mutedForeground,
|
||||
),
|
||||
);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user