feat(ui): full‑width ShadTable across app; fix rent dialog width; correct equipment pagination
- ShadTable: ensure full-width via LayoutBuilder+ConstrainedBox minWidth - BaseListScreen: default data area padding = 0 for table edge-to-edge - Vendor/Model/User/Company/Inventory/Zipcode: set columnSpanExtent per column and add final filler column to absorb remaining width; pin date/status/actions widths; ensure date text is single-line - Equipment: unify card/border style; define fixed column widths + filler; increase checkbox column to 56px to avoid overflow - Rent list: migrate to ShadTable.list with fixed widths + filler column - Rent form dialog: prevent infinite width by bounding ShadProgress with SizedBox and remove Expanded from option rows; add safe selectedOptionBuilder - Admin list: fix const with non-const argument in table column extents - Services/Controller: remove hardcoded perPage=10; use BaseListController perPage; trust server meta (total/totalPages) in equipment pagination - widgets/shad_table: ConstrainedBox(minWidth=viewport) so table stretches Run: flutter analyze → 0 errors (warnings remain).
This commit is contained in:
@@ -32,7 +32,7 @@ class FormLayoutTemplate extends StatelessWidget {
|
||||
appBar: AppBar(
|
||||
title: Text(
|
||||
title,
|
||||
style: ShadcnTheme.headingH3.copyWith( // Phase 10: 표준 헤딩 스타일
|
||||
style: ShadcnTheme.headingH3.copyWith(
|
||||
fontWeight: FontWeight.w600,
|
||||
color: ShadcnTheme.foreground,
|
||||
),
|
||||
@@ -76,7 +76,7 @@ class FormLayoutTemplate extends StatelessWidget {
|
||||
),
|
||||
],
|
||||
),
|
||||
padding: EdgeInsets.fromLTRB(24, 16, 24, 24),
|
||||
padding: const EdgeInsets.fromLTRB(24, 16, 24, 24),
|
||||
child: Row(
|
||||
children: [
|
||||
Expanded(
|
||||
@@ -122,30 +122,30 @@ class FormSection extends StatelessWidget {
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return ShadcnCard(
|
||||
padding: padding ?? EdgeInsets.all(24),
|
||||
padding: padding ?? const EdgeInsets.all(24),
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
if (title != null) ...[
|
||||
Text(
|
||||
title!,
|
||||
style: ShadcnTheme.bodyLarge.copyWith( // Phase 10: 표준 바디 라지
|
||||
style: ShadcnTheme.bodyLarge.copyWith(
|
||||
fontWeight: FontWeight.w600,
|
||||
color: ShadcnTheme.foreground, // Phase 10: 전경색
|
||||
color: ShadcnTheme.foreground,
|
||||
),
|
||||
),
|
||||
if (subtitle != null) ...[
|
||||
SizedBox(height: 4),
|
||||
const SizedBox(height: 4),
|
||||
Text(
|
||||
subtitle!,
|
||||
style: ShadcnTheme.bodyMedium.copyWith( // Phase 10: 표준 바디 미디엄
|
||||
color: ShadcnTheme.mutedForeground, // Phase 10: 뮤트된 전경색
|
||||
style: ShadcnTheme.bodyMedium.copyWith(
|
||||
color: ShadcnTheme.mutedForeground,
|
||||
),
|
||||
),
|
||||
],
|
||||
SizedBox(height: 20),
|
||||
Divider(color: ShadcnTheme.border, height: 1), // Phase 10: 테두리 색상
|
||||
SizedBox(height: 20),
|
||||
const SizedBox(height: 20),
|
||||
Divider(color: ShadcnTheme.border, height: 1),
|
||||
const SizedBox(height: 20),
|
||||
],
|
||||
if (children.isNotEmpty)
|
||||
...children.asMap().entries.map((entry) {
|
||||
@@ -153,7 +153,7 @@ class FormSection extends StatelessWidget {
|
||||
final child = entry.value;
|
||||
if (index < children.length - 1) {
|
||||
return Padding(
|
||||
padding: EdgeInsets.only(bottom: 16),
|
||||
padding: const EdgeInsets.only(bottom: 16),
|
||||
child: child,
|
||||
);
|
||||
} else {
|
||||
@@ -190,33 +190,23 @@ class FormFieldWrapper extends StatelessWidget {
|
||||
children: [
|
||||
Text(
|
||||
label,
|
||||
style: TextStyle(
|
||||
fontSize: 14,
|
||||
fontWeight: FontWeight.w500,
|
||||
color: Color(0xFF374151),
|
||||
),
|
||||
style: ShadcnTheme.labelMedium,
|
||||
),
|
||||
if (required)
|
||||
Text(
|
||||
' *',
|
||||
style: TextStyle(
|
||||
fontSize: 14,
|
||||
color: Color(0xFFEF4444),
|
||||
),
|
||||
style: ShadcnTheme.labelMedium.copyWith(color: ShadcnTheme.destructive),
|
||||
),
|
||||
],
|
||||
),
|
||||
if (hint != null) ...[
|
||||
SizedBox(height: 4),
|
||||
const SizedBox(height: 4),
|
||||
Text(
|
||||
hint!,
|
||||
style: TextStyle(
|
||||
fontSize: 12,
|
||||
color: Color(0xFF6B7280),
|
||||
),
|
||||
style: ShadcnTheme.bodyXs,
|
||||
),
|
||||
],
|
||||
SizedBox(height: 8),
|
||||
const SizedBox(height: 8),
|
||||
child,
|
||||
],
|
||||
);
|
||||
@@ -236,10 +226,10 @@ class UIConstants {
|
||||
static const double columnWidthLarge = 200.0; // 긴 텍스트
|
||||
|
||||
// 색상
|
||||
static const Color backgroundColor = Color(0xFFF5F7FA);
|
||||
static const Color cardBackground = Colors.white;
|
||||
static const Color borderColor = Color(0xFFE5E7EB);
|
||||
static const Color textPrimary = Color(0xFF1A1F36);
|
||||
static const Color textSecondary = Color(0xFF6B7280);
|
||||
static const Color textMuted = Color(0xFF9CA3AF);
|
||||
}
|
||||
static const Color backgroundColor = ShadcnTheme.backgroundSecondary;
|
||||
static const Color cardBackground = ShadcnTheme.card;
|
||||
static const Color borderColor = ShadcnTheme.border;
|
||||
static const Color textPrimary = ShadcnTheme.foreground;
|
||||
static const Color textSecondary = ShadcnTheme.foregroundSecondary;
|
||||
static const Color textMuted = ShadcnTheme.foregroundMuted;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user