|
|
|
@ -84,9 +84,11 @@ class ServiceRequest {
|
|
|
|
|
|
|
|
|
|
|
|
factory ServiceRequest.fromJson(Map<String, dynamic> parsedJson) {
|
|
|
|
factory ServiceRequest.fromJson(Map<String, dynamic> parsedJson) {
|
|
|
|
List<String> images = [];
|
|
|
|
List<String> images = [];
|
|
|
|
|
|
|
|
print(parsedJson["attachmentsCallRequest"]);
|
|
|
|
if (parsedJson["attachmentsCallRequest"] != null) if (parsedJson["attachmentsCallRequest"] is List) {
|
|
|
|
if (parsedJson["attachmentsCallRequest"] != null) if (parsedJson["attachmentsCallRequest"] is List) {
|
|
|
|
List list = parsedJson["attachmentsCallRequest"];
|
|
|
|
List list = parsedJson["attachmentsCallRequest"];
|
|
|
|
images = list.map((e) => URLs.getFileUrl(e["attachmentsCallRequest"])).toList();
|
|
|
|
images = list.map((e) => URLs.getFileUrl(e["name"])).toList();
|
|
|
|
|
|
|
|
print(images);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
return ServiceRequest(
|
|
|
|
return ServiceRequest(
|
|
|
|
id: parsedJson["id"].toString(),
|
|
|
|
id: parsedJson["id"].toString(),
|
|
|
|
@ -123,7 +125,7 @@ class ServiceRequest {
|
|
|
|
reviewComment: parsedJson["reviewComment"],
|
|
|
|
reviewComment: parsedJson["reviewComment"],
|
|
|
|
type: Lookup.fromJson(parsedJson['typeofRequest']),
|
|
|
|
type: Lookup.fromJson(parsedJson['typeofRequest']),
|
|
|
|
defectType: Lookup.fromJson(parsedJson['defectType']),
|
|
|
|
defectType: Lookup.fromJson(parsedJson['defectType']),
|
|
|
|
loanAvailability: Lookup.fromJson(parsedJson['loanAvailability']),
|
|
|
|
loanAvailability: Lookup.fromJson(parsedJson['loanAvailablity']),
|
|
|
|
firstAction: Lookup.fromJson(parsedJson['firstAction']),
|
|
|
|
firstAction: Lookup.fromJson(parsedJson['firstAction']),
|
|
|
|
requestedThrough: Lookup.fromJson(parsedJson['requestedThrough']),
|
|
|
|
requestedThrough: Lookup.fromJson(parsedJson['requestedThrough']),
|
|
|
|
priority: Lookup.fromJson(parsedJson['priority']),
|
|
|
|
priority: Lookup.fromJson(parsedJson['priority']),
|
|
|
|
|