feat(ui): full‑width ShadTable across app; fix rent dialog width; correct equipment pagination
Some checks failed
Flutter Test & Quality Check / Test on macos-latest (push) Has been cancelled
Flutter Test & Quality Check / Test on ubuntu-latest (push) Has been cancelled
Flutter Test & Quality Check / Build APK (push) Has been cancelled

- 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:
JiWoong Sul
2025-09-09 22:38:08 +09:00
parent 655d473413
commit 49b203d366
67 changed files with 2305 additions and 1933 deletions

View File

@@ -16,6 +16,8 @@ class BaseListScreen extends StatelessWidget {
final VoidCallback? onRefresh;
final String emptyMessage;
final IconData emptyIcon;
// 데이터 테이블 영역 좌우 패딩(기본: spacing6). 화면별로 전체폭 사용이 필요할 경우 0으로 설정.
final EdgeInsetsGeometry dataAreaPadding;
const BaseListScreen({
super.key,
@@ -30,6 +32,8 @@ class BaseListScreen extends StatelessWidget {
this.onRefresh,
this.emptyMessage = '데이터가 없습니다',
this.emptyIcon = Icons.inbox_outlined,
// 기본값을 0으로 설정해 테이블 영역이 가용 폭을 모두 사용하도록 함
this.dataAreaPadding = EdgeInsets.zero,
});
@override
@@ -78,7 +82,7 @@ class BaseListScreen extends StatelessWidget {
// 데이터 테이블 - 헤더 고정, 바디만 스크롤
Expanded(
child: Padding(
padding: const EdgeInsets.symmetric(horizontal: ShadcnTheme.spacing6),
padding: dataAreaPadding,
child: dataTable,
),
),
@@ -125,7 +129,7 @@ class BaseListScreen extends StatelessWidget {
onPressed: onRefresh,
style: ElevatedButton.styleFrom(
backgroundColor: ShadcnTheme.primary,
foregroundColor: Colors.white,
foregroundColor: ShadcnTheme.primaryForeground,
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(ShadcnTheme.radiusMd),
),
@@ -153,4 +157,4 @@ class BaseListScreen extends StatelessWidget {
),
);
}
}
}