From fc3cf4de0fb2b958fe0334732be8808214e9213d Mon Sep 17 00:00:00 2001 From: songchunyi <2402265378@qq.com> Date: Tue, 25 Aug 2026 03:44:01 +0000 Subject: [PATCH] =?UTF-8?q?=E5=88=A0=E9=99=A4=20=5Ffix=5Foverflow.py?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- _fix_overflow.py | 43 ------------------------------------------- 1 file changed, 43 deletions(-) delete mode 100644 _fix_overflow.py diff --git a/_fix_overflow.py b/_fix_overflow.py deleted file mode 100644 index 02f4c842..00000000 --- a/_fix_overflow.py +++ /dev/null @@ -1,43 +0,0 @@ -filepath = r'C:\Users\jsmbz\Documents\flutter-app-02\lib\features\home\presentation\widgets\map\testmap_pages.dart' - -with open(filepath, 'r', encoding='utf-8') as f: - content = f.read() - -old = ''' const SizedBox(height: 4), - Row( - children: [ - Text( - '设备: ${currentTask.deviceId}', - style: const TextStyle( - fontSize: 12, - color: Color(0xFF4E5969), - ), - ), - const SizedBox(width: 12), - Container(''' - -new = ''' const SizedBox(height: 4), - Text( - '设备: ${currentTask.deviceId}', - style: const TextStyle( - fontSize: 12, - color: Color(0xFF4E5969), - ), - softWrap: true, - maxLines: 2, - overflow: TextOverflow.ellipsis, - ), - const SizedBox(height: 4), - Container(''' - -if old in content: - content = content.replace(old, new) - with open(filepath, 'w', encoding='utf-8') as f: - f.write(content) - print('SUCCESS - replaced device ID text with wrapping support') -else: - print('NOT FOUND') - # Debug: find the line - for i, line in enumerate(content.split('\n'), 1): - if "设备: ${currentTask.deviceId}" in line: - print(f'Line {i}: {repr(line)}')