From 0441305e1c2722cbc46f284f3195b25de0b9c247 Mon Sep 17 00:00:00 2001 From: JiWoong Sul Date: Tue, 9 Sep 2025 22:58:36 +0900 Subject: [PATCH] chore(zipcode): remove copy icons and clipboard helpers; cap dialog width to 33% of screen - Remove copy buttons in ZipcodeTable (zipcode and full address) - Drop unused clipboard helper and import - Use tableMaxWidthFraction: 0.33 in Company/Warehouse zipcode dialogs --- lib/screens/company/company_form.dart | 2 +- .../warehouse_location_form.dart | 2 +- .../zipcode/components/zipcode_table.dart | 32 ++----------------- 3 files changed, 5 insertions(+), 31 deletions(-) diff --git a/lib/screens/company/company_form.dart b/lib/screens/company/company_form.dart index 7eaea1d..c8f7cda 100644 --- a/lib/screens/company/company_form.dart +++ b/lib/screens/company/company_form.dart @@ -109,7 +109,7 @@ _controller = CompanyFormController( GetIt.instance(), ), child: ZipcodeSearchScreen( - tableMaxWidthFraction: 0.5, + tableMaxWidthFraction: 0.33, onSelect: (zipcode) { Navigator.of(dialogContext).pop(zipcode); }, diff --git a/lib/screens/warehouse_location/warehouse_location_form.dart b/lib/screens/warehouse_location/warehouse_location_form.dart index eca1e40..7e9641a 100644 --- a/lib/screens/warehouse_location/warehouse_location_form.dart +++ b/lib/screens/warehouse_location/warehouse_location_form.dart @@ -80,7 +80,7 @@ class _WarehouseLocationFormScreenState GetIt.instance(), ), child: ZipcodeSearchScreen( - tableMaxWidthFraction: 0.5, + tableMaxWidthFraction: 0.33, onSelect: (zipcode) { Navigator.of(dialogContext).pop(zipcode); }, diff --git a/lib/screens/zipcode/components/zipcode_table.dart b/lib/screens/zipcode/components/zipcode_table.dart index 1eb69aa..8365d23 100644 --- a/lib/screens/zipcode/components/zipcode_table.dart +++ b/lib/screens/zipcode/components/zipcode_table.dart @@ -1,6 +1,5 @@ import 'package:flutter/material.dart'; import 'dart:math' as math; -import 'package:flutter/services.dart'; import 'package:shadcn_ui/shadcn_ui.dart'; import 'package:superport/data/models/zipcode_dto.dart'; @@ -23,17 +22,7 @@ class ZipcodeTable extends StatelessWidget { this.maxWidthCap, }); - void _copyToClipboard(BuildContext context, String text, String label) { - Clipboard.setData(ClipboardData(text: text)); - - ShadToaster.of(context).show( - ShadToast( - title: Text('$label 복사됨'), - description: Text(text), - duration: const Duration(seconds: 2), - ), - ); - } + // copy helpers removed per UX request (no copy icons in popup) @override Widget build(BuildContext context) { @@ -114,12 +103,7 @@ class ZipcodeTable extends StatelessWidget { ), ), ), - const SizedBox(width: 8), - ShadButton.ghost( - onPressed: () => _copyToClipboard(context, zipcode.zipcode.toString().padLeft(5, '0'), '우편번호'), - size: ShadButtonSize.sm, - child: Icon(Icons.copy, size: 14, color: theme.colorScheme.mutedForeground), - ), + // copy icon removed per spec ], ), ), @@ -149,17 +133,7 @@ class ZipcodeTable extends StatelessWidget { ShadTableCell( child: SizedBox( width: etcW, - child: Row( - children: [ - Expanded(child: Text(zipcode.etc, overflow: TextOverflow.ellipsis, style: TextStyle(color: theme.colorScheme.foreground))), - const SizedBox(width: 8), - ShadButton.ghost( - onPressed: () => _copyToClipboard(context, zipcode.fullAddress, '전체주소'), - size: ShadButtonSize.sm, - child: Icon(Icons.copy, size: 14, color: theme.colorScheme.mutedForeground), - ), - ], - ), + child: Text(zipcode.etc, overflow: TextOverflow.ellipsis, style: TextStyle(color: theme.colorScheme.foreground)), ), ), // 작업