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>(),
|
GetIt.instance<ZipcodeUseCase>(),
|
||||||
),
|
),
|
||||||
child: ZipcodeSearchScreen(
|
child: ZipcodeSearchScreen(
|
||||||
tableMaxWidthFraction: 0.5,
|
tableMaxWidthFraction: 0.33,
|
||||||
onSelect: (zipcode) {
|
onSelect: (zipcode) {
|
||||||
Navigator.of(dialogContext).pop(zipcode);
|
Navigator.of(dialogContext).pop(zipcode);
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -80,7 +80,7 @@ class _WarehouseLocationFormScreenState
|
|||||||
GetIt.instance<ZipcodeUseCase>(),
|
GetIt.instance<ZipcodeUseCase>(),
|
||||||
),
|
),
|
||||||
child: ZipcodeSearchScreen(
|
child: ZipcodeSearchScreen(
|
||||||
tableMaxWidthFraction: 0.5,
|
tableMaxWidthFraction: 0.33,
|
||||||
onSelect: (zipcode) {
|
onSelect: (zipcode) {
|
||||||
Navigator.of(dialogContext).pop(zipcode);
|
Navigator.of(dialogContext).pop(zipcode);
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -1,6 +1,5 @@
|
|||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'dart:math' as math;
|
import 'dart:math' as math;
|
||||||
import 'package:flutter/services.dart';
|
|
||||||
import 'package:shadcn_ui/shadcn_ui.dart';
|
import 'package:shadcn_ui/shadcn_ui.dart';
|
||||||
import 'package:superport/data/models/zipcode_dto.dart';
|
import 'package:superport/data/models/zipcode_dto.dart';
|
||||||
|
|
||||||
@@ -23,17 +22,7 @@ class ZipcodeTable extends StatelessWidget {
|
|||||||
this.maxWidthCap,
|
this.maxWidthCap,
|
||||||
});
|
});
|
||||||
|
|
||||||
void _copyToClipboard(BuildContext context, String text, String label) {
|
// copy helpers removed per UX request (no copy icons in popup)
|
||||||
Clipboard.setData(ClipboardData(text: text));
|
|
||||||
|
|
||||||
ShadToaster.of(context).show(
|
|
||||||
ShadToast(
|
|
||||||
title: Text('$label 복사됨'),
|
|
||||||
description: Text(text),
|
|
||||||
duration: const Duration(seconds: 2),
|
|
||||||
),
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
@@ -114,12 +103,7 @@ class ZipcodeTable extends StatelessWidget {
|
|||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
const SizedBox(width: 8),
|
// copy icon removed per spec
|
||||||
ShadButton.ghost(
|
|
||||||
onPressed: () => _copyToClipboard(context, zipcode.zipcode.toString().padLeft(5, '0'), '우편번호'),
|
|
||||||
size: ShadButtonSize.sm,
|
|
||||||
child: Icon(Icons.copy, size: 14, color: theme.colorScheme.mutedForeground),
|
|
||||||
),
|
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
@@ -149,17 +133,7 @@ class ZipcodeTable extends StatelessWidget {
|
|||||||
ShadTableCell(
|
ShadTableCell(
|
||||||
child: SizedBox(
|
child: SizedBox(
|
||||||
width: etcW,
|
width: etcW,
|
||||||
child: Row(
|
child: Text(zipcode.etc, overflow: TextOverflow.ellipsis, style: TextStyle(color: theme.colorScheme.foreground)),
|
||||||
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),
|
|
||||||
),
|
|
||||||
],
|
|
||||||
),
|
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
// 작업
|
// 작업
|
||||||
|
|||||||
Reference in New Issue
Block a user