import 'dart:typed_data'; /// 单张标签的全部打印字段,预览和打印共用同一份数据。 class LabelData { /// 商品 ID,多张懒加载 QR 时用于拉取二维码字节。 final int? productId; /// 二维码字节(PNG);单张场景调用方提前拉好;多张场景由 qrFetcher 懒加载填入。 Uint8List? qrBytes; final String name; final String code; final String? spec; final String? series; final String? batchNo; final String? productionDate; final String? remark; final String shopName; final String shopAddress; final String shopPhone; /// 打印份数,默认 1,可在预览弹窗里调整。 int copies; LabelData({ this.productId, this.qrBytes, required this.name, required this.code, this.spec, this.series, this.batchNo, this.productionDate, this.remark, this.shopName = '', this.shopAddress = '', this.shopPhone = '', this.copies = 1, }); }