guanxinyi 4 miesięcy temu
rodzic
commit
45357f676f
1 zmienionych plików z 8 dodań i 1 usunięć
  1. 8 1
      lib/services/aIDiagnosis.m.dart

+ 8 - 1
lib/services/aIDiagnosis.m.dart

@@ -3,6 +3,8 @@ import 'liveConsultation.m.dart';
 
 import 'package:fis_jsonrpc/utils.dart';
 
+import 'dart:convert';
+
 class AIDiagnosisRect {
 	int right;
 	int bottom;
@@ -2419,8 +2421,13 @@ class VetAutoTraceImageResult {
 	});
 
 	factory VetAutoTraceImageResult.fromJson(Map<String, dynamic> map) {
+		final pWTraceInfosMap= <String,PWTraceDTO>{};
+		final Map<String, dynamic> jsonpWTraceInfosMap = jsonDecode(map['PWTraceInfos']);
+		for (var key in jsonpWTraceInfosMap.keys) {
+			pWTraceInfosMap[key] = PWTraceDTO.fromJson(jsonpWTraceInfosMap[key]);
+		}
 		return VetAutoTraceImageResult( 
-			pWTraceInfos: map['PWTraceInfos'] != null ? map['PWTraceInfos'] as Map<String,PWTraceDTO> : null,
+			 pWTraceInfos : pWTraceInfosMap
 		);
 	}