初始化项目

This commit is contained in:
wyf
2025-04-11 08:47:46 +08:00
parent e0e1055d65
commit 9396f18d09
199 changed files with 6516 additions and 216 deletions

View File

@@ -0,0 +1,31 @@
import 'package:ef/ef.dart';
import 'package:json_annotation/json_annotation.dart';
part 'blueteeth_bind_controller.g.dart'; // 由json_serializable自动生成的部分
@JsonSerializable()
class BlueteethBindModel {
int read = 1;//是否不再提示教程 0 不再提示 1 需要提示
BlueteethBindModel();
// 从JSON反序列化时的异常处理
factory BlueteethBindModel.fromJson(Map<String, dynamic> json) {
try {
return _$BlueteethBindModelFromJson(json);
} catch (e) {
// 在实际应用中,应该有更细致的异常处理策略和错误日志
return BlueteethBindModel(); // 或者返回一个带有错误信息的特定DeviceInfoModel实例
}
}
// 序列化为JSON时的异常处理
Map<String, dynamic> toJson() => _$BlueteethBindModelToJson(this);
}
class BlueteethBindController extends GetControllerEx<BlueteethBindModel> {
BlueteethBindController() {
attr = GetModel(BlueteethBindModel()).obs;
}
}