50b139c97a
- 打印改为 Web 平台用 HTML+CSS 方案,避免 pdf 包中文字体 bug - 新增 print_util.dart 条件导入层(web/stub),彻底隔离 platform channel - XLS 导入不再依赖 DIMENSIONS 记录的 MaxRow,改为读到连续5空行停止 - Nginx /images/ 加 ^~ 前缀,防止 .jpg 正则 location 拦截 Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
14 lines
507 B
Dart
14 lines
507 B
Dart
import 'dart:typed_data';
|
|
import 'print_util_stub.dart'
|
|
if (dart.library.js_interop) 'print_util_web.dart';
|
|
|
|
/// 打印商品标签(二维码 + 名称 + 编号)。
|
|
/// Web:生成 HTML 弹出新窗口调用浏览器打印。
|
|
/// 非 Web:生成 PDF 用 printing 包调起原生打印。
|
|
Future<void> printProductLabel({
|
|
required Uint8List qrBytes,
|
|
required String name,
|
|
required String code,
|
|
String? spec,
|
|
}) => printProductLabelImpl(qrBytes: qrBytes, name: name, code: code, spec: spec);
|