feat(android): 平板版适配(1280×800dp,免授权,应用商店分发)
- flutter create 增加 android 平台:包名 cc.sincos.sequence_diagram,应用名「时序图设计器」,minSdk 24 / targetSdk 36 - 多分辨率动态兼容:触屏侧栏默认贴边把手(点把手直接停靠),面板宽度随屏宽压缩,窄屏双侧栏停靠不溢出 - 免授权:LicenseService 非 Windows 平台直接判定已授权 - 移动端存储/文件浏览器适配(无 APPDATA/盘符/桌面);edge-to-edge + SafeArea + 文本缩放固定 1.0 - launcher 图标沿用「环序」标志(tools/gen-android-icons.py);Gradle 腾讯镜像 + Maven 阿里镜像 - 自测:7 种分辨率无溢出回归(test/tablet_layout_test.dart)+ 平板截图(demo/tablet-*.png) - 产物:release/sequence_diagram_tablet_v1.0.1_release.apk(universal,50.3MB)
This commit is contained in:
+20
-15
@@ -98,7 +98,11 @@ class _FileBrowserDialogState extends State<FileBrowserDialog> {
|
||||
super.initState();
|
||||
String start = widget.initialPath ?? '';
|
||||
if (start.isEmpty) {
|
||||
start = Platform.environment['USERPROFILE'] ?? Directory.current.path;
|
||||
// 桌面版从用户目录开始;Android/iOS 从应用可写目录(系统临时目录)开始。
|
||||
start = Platform.environment['USERPROFILE'] ??
|
||||
(Platform.isAndroid || Platform.isIOS
|
||||
? Directory.systemTemp.path
|
||||
: Directory.current.path);
|
||||
}
|
||||
if (File(start).existsSync()) {
|
||||
start = File(start).parent.path;
|
||||
@@ -218,21 +222,22 @@ class _FileBrowserDialogState extends State<FileBrowserDialog> {
|
||||
scrollDirection: Axis.horizontal,
|
||||
child: Row(
|
||||
children: <Widget>[
|
||||
// 桌面快捷入口:导出 / 打开 / 保存时一键跳到桌面。
|
||||
Padding(
|
||||
padding: const EdgeInsets.only(right: 6),
|
||||
child: ActionChip(
|
||||
avatar: Icon(Icons.desktop_windows_outlined, size: 15, color: t.accent),
|
||||
label: const Text('桌面'),
|
||||
onPressed: () {
|
||||
final Directory? d = _desktop();
|
||||
if (d != null) {
|
||||
_dir = d;
|
||||
_refresh();
|
||||
}
|
||||
},
|
||||
// 桌面快捷入口:仅在桌面平台显示(移动平台无“桌面”概念)。
|
||||
if (Platform.isWindows || Platform.isLinux || Platform.isMacOS)
|
||||
Padding(
|
||||
padding: const EdgeInsets.only(right: 6),
|
||||
child: ActionChip(
|
||||
avatar: Icon(Icons.desktop_windows_outlined, size: 15, color: t.accent),
|
||||
label: const Text('桌面'),
|
||||
onPressed: () {
|
||||
final Directory? d = _desktop();
|
||||
if (d != null) {
|
||||
_dir = d;
|
||||
_refresh();
|
||||
}
|
||||
},
|
||||
),
|
||||
),
|
||||
),
|
||||
...drives.map((String d) {
|
||||
return Padding(
|
||||
padding: const EdgeInsets.only(right: 6),
|
||||
|
||||
Reference in New Issue
Block a user