chore(zipcode): remove copy icons and clipboard helpers; cap dialog width to 33% of screen
Some checks failed
Flutter Test & Quality Check / Build APK (push) Has been cancelled
Flutter Test & Quality Check / Test on macos-latest (push) Has been cancelled
Flutter Test & Quality Check / Test on ubuntu-latest (push) Has been cancelled

- Remove copy buttons in ZipcodeTable (zipcode and full address)
- Drop unused clipboard helper and import
- Use tableMaxWidthFraction: 0.33 in Company/Warehouse zipcode dialogs
This commit is contained in:
JiWoong Sul
2025-09-09 22:58:36 +09:00
parent 2bbef9defa
commit 0441305e1c
3 changed files with 5 additions and 31 deletions

View File

@@ -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)),
),
),
// 작업