feat:取消系统自带软键盘设计,改为系统自用键盘组件-初步
feat:将打印分为图片打印和命令式打印-初步
This commit is contained in:
1 parent
94ee7415b1
commit
e68f41375b
38 files changed
+1471
-408
No files matched your search
@@ -91,6 +91,15 @@ abstract class AppSettingTool {
|
||||
static const String _productMealPeriodsKey = "productMealPeriods";
|
||||
static const String _serialCardConfigKey = "serialCardConfig";
|
||||
|
||||
/// 打印输出方式在 sysJson 中的键,与 [SysSetting.printerOutputMode] 字段名一致。
|
||||
static const String _printerOutputModeKey = "printerOutputMode";
|
||||
|
||||
/// 打印输出方式取值:下载后端图片转 ESC/POS 栅格指令(默认,兼容所有后端版本)。
|
||||
static const String printerOutputModeImage = 'IMAGE';
|
||||
|
||||
/// 打印输出方式取值:直接写入后端随打印任务下发的 Base64 指令流,出纸更快。
|
||||
static const String printerOutputModeCommand = 'COMMAND';
|
||||
|
||||
/// v8 之前短暂保存定时任务配置的旧 sysJson 键,仅供一次性迁移读取。
|
||||
static const String _scheduledTaskConfigsKey = "scheduledTaskConfigs";
|
||||
|
||||
@@ -947,6 +956,15 @@ abstract class AppSettingTool {
|
||||
return setting;
|
||||
}
|
||||
|
||||
/// 切换本机打印输出方式:IMAGE=图片栅格打印,COMMAND=指令流直写。
|
||||
///
|
||||
/// 仅写 sysJson 局部键,不触碰后台下发的打印机绑定字段;指令模式下
|
||||
/// 无指令数据的旧任务会自动回退图片打印,因此可随时来回切换。
|
||||
static Future<void> setPrinterOutputMode(String mode) =>
|
||||
_updateSysJson((sysJson) {
|
||||
sysJson[_printerOutputModeKey] = mode;
|
||||
});
|
||||
|
||||
/// 绑定设备信息
|
||||
static Future<bool> bindSys(int serviceId) async {
|
||||
var androidId = await AppSysTool.getAndroidId();
|
||||
|
||||
Reference in new issue
Block a user