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
This commit is contained in:
@@ -109,7 +109,7 @@ _controller = CompanyFormController(
|
||||
GetIt.instance<ZipcodeUseCase>(),
|
||||
),
|
||||
child: ZipcodeSearchScreen(
|
||||
tableMaxWidthFraction: 0.5,
|
||||
tableMaxWidthFraction: 0.33,
|
||||
onSelect: (zipcode) {
|
||||
Navigator.of(dialogContext).pop(zipcode);
|
||||
},
|
||||
|
||||
@@ -80,7 +80,7 @@ class _WarehouseLocationFormScreenState
|
||||
GetIt.instance<ZipcodeUseCase>(),
|
||||
),
|
||||
child: ZipcodeSearchScreen(
|
||||
tableMaxWidthFraction: 0.5,
|
||||
tableMaxWidthFraction: 0.33,
|
||||
onSelect: (zipcode) {
|
||||
Navigator.of(dialogContext).pop(zipcode);
|
||||
},
|
||||
|
||||
@@ -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)),
|
||||
),
|
||||
),
|
||||
// 작업
|
||||
|
||||
Reference in New Issue
Block a user