Desktop.fromJson constructor
Desktop.fromJson(
- dynamic json
Implementation
factory Desktop.fromJson(dynamic json) {
if (json is List) {
return Desktop(faceModel: _models(json), handModel: const []);
}
if (json is! Map) {
return Desktop(faceModel: const [], handModel: const []);
}
return Desktop(
faceModel: _models(json["faceModel"] ?? json["face_model"]),
handModel: _models(json["handModel"] ?? json["hand_model"]),
);
}