0

I want to display restaurent details inside listview. But, i am constantly getting error called "Null check operator used on null" value even if i am getting the json response body. Can anyone help me with this to know where exactly i am going wrong? Error shows inside the lisview builder. I want to display json data inside listview.

Json to be fetched

[{
    "_id": "5cd140215dcd1c1cf4971f72",
    "Name": "Gin Menu",
    "IsMain": false,
    "Schedule": [],
    "Image": {
        "ID": "5c1cd81db5cf1707ac419be1",
        "Name": "Gin Menu Banner.jpg",
        "AltText": "Gin Menu",
        "Url": "/local-media/5c1cd81db5cf1707ac419be1/Gin Menu Bannermin.jpg",
        "FileSize": 133268,
        "IsImage": true,
        "Sizes": [{
            "Name": "thumb",
            "Height": 72,
            "Width": 150,
            "Url": "/local-media/5c1cd81db5cf1707ac419be1/size/thumb-1545394278352.jpg"
        }]
    },
    "FeatureBoxImage": {
        "ID": "5c1cd813b5cf1707ac419be0",
        "Name": "Gin Menu Small.jpg",
        "AltText": "Gin Menu",
        "Url": "/local-media/5c1cd813b5cf1707ac419be0/Gin Menu Smallmin.jpg",
        "FileSize": 52722,
        "IsImage": true,
        "Sizes": [{
            "Name": "thumb",
            "Height": 112,
            "Width": 150,
            "Url": "/local-media/5c1cd813b5cf1707ac419be0/size/thumb-1545394278530.jpg"
        }]
    },
    "ModifiedDate": "2019-06-26T06:42:44.754Z"
}, {
    "_id": "5c7d0dcb1ce9a723b46207d8",
    "Name": "The Brigadoon",
    "IsMain": false,
    "Schedule": [],
    "Image": {
        "ID": "5c1cc449b5cf1707ac419bda",
        "Name": "Brigadoon Banner.jpg",
        "AltText": "Black Watch Brigadoon",
        "Url": "/local-media/5c1cc449b5cf1707ac419bda/Brigadoon Bannermin.jpg",
        "FileSize": 111161,
        "IsImage": true,
        "Sizes": [{
            "Name": "thumb",
            "Height": 72,
            "Width": 150,
            "Url": "/local-media/5c1cc449b5cf1707ac419bda/size/thumb-1545389147819.jpg"
        }]
    },
    "FeatureBoxImage": {
        "ID": "5c1cc3ceb5cf1707ac419bd9",
        "Name": "Brigadoon Small.jpg",
        "AltText": "Black Watch Brigadoon",
        "Url": "/local-media/5c1cc3ceb5cf1707ac419bd9/Brigadoon Smallmin.jpg",
        "FileSize": 57222,
        "IsImage": true,
        "Sizes": [{
            "Name": "thumb",
            "Height": 112,
            "Width": 150,
            "Url": "/local-media/5c1cc3ceb5cf1707ac419bd9/size/thumb-1545389035679.jpg"
        }]
    },
    "ModifiedDate": "2019-06-26T06:42:44.753Z"
}, {
    "_id": "5c4711bd9e7cfb1ea4885404",
    "Name": "Little Skippers",
    "IsMain": false,
    "Schedule": [],
    "Image": {
        "ID": "5c24a847df2455109c8a0e84",
        "Name": "Little Skippers Banner.jpg",
        "AltText": "Little Skippers",
        "Url": "/local-media/5c24a847df2455109c8a0e84/Little Skippers Bannermin.jpg",
        "FileSize": 72479,
        "IsImage": true,
        "Sizes": [{
            "Name": "thumb",
            "Height": 72,
            "Width": 150,
            "Url": "/local-media/5c24a847df2455109c8a0e84/size/thumb-1545907409393.jpg"
        }]
    },
    "FeatureBoxImage": {
        "ID": "5c24a846df2455109c8a0e83",
        "Name": "Little Skippers Small.jpg",
        "AltText": "Little Skippers",
        "Url": "/local-media/5c24a846df2455109c8a0e83/Little Skippers Smallmin.jpg",
        "FileSize": 26117,
        "IsImage": true,
        "Sizes": [{
            "Name": "thumb",
            "Height": 112,
            "Width": 150,
            "Url": "/local-media/5c24a846df2455109c8a0e83/size/thumb-1545907409398.jpg"
        }]
    },
    "ModifiedDate": "2019-06-26T06:42:44.753Z"
}, {
    "_id": "5c4711b89e7cfb1ea4885403",
    "Name": "Speciality Drinks",
    "IsMain": false,
    "Schedule": [],
    "Image": {
        "ID": "5c24a846df2455109c8a0e80",
        "Name": "Speciality Drinks Banner.jpg",
        "AltText": "Speciality Drinks",
        "Url": "/local-media/5c24a846df2455109c8a0e80/Speciality Drinks Bannermin.jpg",
        "FileSize": 69032,
        "IsImage": true,
        "Sizes": [{
            "Name": "thumb",
            "Height": 72,
            "Width": 150,
            "Url": "/local-media/5c24a846df2455109c8a0e80/size/thumb-1545907409390.jpg"
        }]
    },
    "FeatureBoxImage": {
        "ID": "5c24a845df2455109c8a0e7f",
        "Name": "Speciality Drinks Small.jpg",
        "AltText": "Speciality Drinks",
        "Url": "/local-media/5c24a845df2455109c8a0e7f/Speciality Drinks Smallmin.jpg",
        "FileSize": 35169,
        "IsImage": true,
        "Sizes": [{
            "Name": "thumb",
            "Height": 112,
            "Width": 150,
            "Url": "/local-media/5c24a845df2455109c8a0e7f/size/thumb-1545907409324.jpg"
        }]
    },
    "ModifiedDate": "2019-06-26T06:42:44.753Z"
}, {
    "_id": "5c4711ae59ef2019802fc5f7",
    "Name": "Traditional Afternoon Tea",
    "IsMain": false,
    "Schedule": [],
    "Image": {
        "ID": "5c24a8459b560023f4f1253b",
        "Name": "Traditional Afternoon Tea Banner.jpg",
        "AltText": "Traditional Afternoon Tea",
        "Url": "/local-media/5c24a8459b560023f4f1253b/TAT Bannermin.jpg",
        "FileSize": 73732,
        "IsImage": true,
        "Sizes": [{
            "Name": "thumb",
            "Height": 72,
            "Width": 150,
            "Url": "/local-media/5c24a8459b560023f4f1253b/size/thumb-1545907409389.jpg"
        }]
    },
    "FeatureBoxImage": {
        "ID": "5c24a845df2455109c8a0e7e",
        "Name": "Traditional Afternoon Tea Small.jpg",
        "AltText": "Traditional Afternoon Tea",
        "Url": "/local-media/5c24a845df2455109c8a0e7e/TAT Smallmin.jpg",
        "FileSize": 41278,
        "IsImage": true,
        "Sizes": [{
            "Name": "thumb",
            "Height": 112,
            "Width": 150,
            "Url": "/local-media/5c24a845df2455109c8a0e7e/size/thumb-1545907409405.jpg"
        }]
    },
    "ModifiedDate": "2019-06-26T06:42:44.753Z"
}, {
    "_id": "5c4711a859ef2019802fc5f6",
    "Name": "The Bookmark Café",
    "IsMain": false,
    "Schedule": [],
    "Image": {
        "ID": "5c24a845df2455109c8a0e7d",
        "Name": "The Bookmark Cafe Banner.jpg",
        "AltText": "The Bookmark Cafe",
        "Url": "/local-media/5c24a845df2455109c8a0e7d/The Bookmark Cafe Bannermin.jpg",
        "FileSize": 79988,
        "IsImage": true,
        "Sizes": [{
            "Name": "thumb",
            "Height": 72,
            "Width": 150,
            "Url": "/local-media/5c24a845df2455109c8a0e7d/size/thumb-1545907409388.jpg"
        }]
    },
    "FeatureBoxImage": {
        "ID": "5c24a8459b560023f4f1253a",
        "Name": "The Bookmark Cafe Small.jpg",
        "AltText": "The Bookmark Cafe",
        "Url": "/local-media/5c24a8459b560023f4f1253a/The Bookmark Cafe Smallmin.jpg",
        "FileSize": 42153,
        "IsImage": true,
        "Sizes": [{
            "Name": "thumb",
            "Height": 112,
            "Width": 150,
            "Url": "/local-media/5c24a8459b560023f4f1253a/size/thumb-1545907409398.jpg"
        }]
    },
    "ModifiedDate": "2019-06-26T06:42:44.753Z"
}, {
    "_id": "5c47119d59ef2019802fc5f5",
    "Name": "All Inclusive",
    "IsMain": false,
    "Schedule": [],
    "Image": {
        "ID": "5c24acf69b560023f4f12543",
        "Name": "All Inclusive Banner.jpg",
        "AltText": "All Inclusive",
        "Url": "/local-media/5c24acf69b560023f4f12543/All Inclusive Bannermin.jpg",
        "FileSize": 78711,
        "IsImage": true,
        "Sizes": [{
            "Name": "thumb",
            "Height": 72,
            "Width": 150,
            "Url": "/local-media/5c24acf69b560023f4f12543/size/thumb-1545907482729.jpg"
        }]
    },
    "FeatureBoxImage": {
        "ID": "5c24acf6df2455109c8a0e8c",
        "Name": "All Inclusive Small.jpg",
        "AltText": "All Inclusive",
        "Url": "/local-media/5c24acf6df2455109c8a0e8c/All Inclusive Smallmin.jpg",
        "FileSize": 41256,
        "IsImage": true,
        "Sizes": [{
            "Name": "thumb",
            "Height": 112,
            "Width": 150,
            "Url": "/local-media/5c24acf6df2455109c8a0e8c/size/thumb-1545907482803.jpg"
        }]
    },
    "ModifiedDate": "2019-06-26T06:42:44.752Z"
}, {
    "_id": "5c4711919e7cfb1ea48853ff",
    "Name": "Bar Menu",
    "IsMain": false,
    "Schedule": [],
    "Image": {
        "ID": "5c24a847df2455109c8a0e85",
        "Name": "Bar Menu Banner.jpg",
        "AltText": "Bar Menu",
        "Url": "/local-media/5c24a847df2455109c8a0e85/Bar Menu Bannermin.jpg",
        "FileSize": 95343,
        "IsImage": true,
        "Sizes": [{
            "Name": "thumb",
            "Height": 72,
            "Width": 150,
            "Url": "/local-media/5c24a847df2455109c8a0e85/size/thumb-1545907409106.jpg"
        }]
    },
    "FeatureBoxImage": {
        "ID": "5c24a8479b560023f4f1253c",
        "Name": "Bar Menu Small.jpg",
        "AltText": "Bar Menu",
        "Url": "/local-media/5c24a8479b560023f4f1253c/Bar Menu Smallmin.jpg",
        "FileSize": 49277,
        "IsImage": true,
        "Sizes": [{
            "Name": "thumb",
            "Height": 112,
            "Width": 150,
            "Url": "/local-media/5c24a8479b560023f4f1253c/size/thumb-1545907409139.jpg"
        }]
    },
    "ModifiedDate": "2019-06-26T06:42:44.752Z"
}, {
    "_id": "5c4711799e7cfb1ea48853fd",
    "Name": "Wine Menu",
    "IsMain": false,
    "Schedule": [],
    "Image": {
        "ID": "5c1cd45f8ad49c181c12f02c",
        "Name": "Wine Banner.jpg",
        "AltText": "Wine Menu",
        "Url": "/local-media/5c1cd45f8ad49c181c12f02c/Wine Bannermin.jpg",
        "FileSize": 67251,
        "IsImage": true,
        "Sizes": [{
            "Name": "thumb",
            "Height": 72,
            "Width": 150,
            "Url": "/local-media/5c1cd45f8ad49c181c12f02c/size/thumb-1545394278503.jpg"
        }]
    },
    "FeatureBoxImage": {
        "ID": "5c1cd45e8ad49c181c12f02b",
        "Name": "Wine Small.jpg",
        "AltText": "Wine Menu",
        "Url": "/local-media/5c1cd45e8ad49c181c12f02b/Wine Smallmin.jpg",
        "FileSize": 33842,
        "IsImage": true,
        "Sizes": [{
            "Name": "thumb",
            "Height": 112,
            "Width": 150,
            "Url": "/local-media/5c1cd45e8ad49c181c12f02b/size/thumb-1545394278527.jpg"
        }]
    },
    "ModifiedDate": "2019-06-26T06:42:44.752Z"
}, {
    "_id": "5c4710e159ef2019802fc5ec",
    "Name": "Room Service",
    "IsMain": false,
    "Schedule": [],
    "Image": {
        "ID": "5c24a846df2455109c8a0e82",
        "Name": "Room Service Banner.jpg",
        "AltText": "Room Service",
        "Url": "/local-media/5c24a846df2455109c8a0e82/Room Service Bannermin.jpg",
        "FileSize": 64807,
        "IsImage": true,
        "Sizes": [{
            "Name": "thumb",
            "Height": 72,
            "Width": 150,
            "Url": "/local-media/5c24a846df2455109c8a0e82/size/thumb-1545907409399.jpg"
        }]
    },
    "FeatureBoxImage": {
        "ID": "5c24a846df2455109c8a0e81",
        "Name": "Room Service Small.jpg",
        "AltText": "Room Service",
        "Url": "/local-media/5c24a846df2455109c8a0e81/Room Service Smallmin.jpg",
        "FileSize": 32031,
        "IsImage": true,
        "Sizes": [{
            "Name": "thumb",
            "Height": 112,
            "Width": 150,
            "Url": "/local-media/5c24a846df2455109c8a0e81/size/thumb-1545907409389.jpg"
        }]
    },
    "ModifiedDate": "2019-06-26T06:42:44.760Z"
}, {
    "_id": "5c47107d59ef2019802fc5e8",
    "Name": "The Oriental Room",
    "IsMain": false,
    "Schedule": [],
    "Image": {
        "ID": "5c1ccbae8ad49c181c12f029",
        "Name": "BW Oriental Room Banner.jpg",
        "AltText": "Black Watch Oriental Room",
        "Url": "/local-media/5c1ccbae8ad49c181c12f029/BW Oriental Room Bannermin.jpg",
        "FileSize": 66118,
        "IsImage": true,
        "Sizes": [{
            "Name": "thumb",
            "Height": 72,
            "Width": 150,
            "Url": "/local-media/5c1ccbae8ad49c181c12f029/size/thumb-1545391203248.jpg"
        }]
    },
    "FeatureBoxImage": {
        "ID": "5c1ccbac8ad49c181c12f028",
        "Name": "BW Oriental Room Small.jpg",
        "AltText": "Black Watch Oriental Room",
        "Url": "/local-media/5c1ccbac8ad49c181c12f028/BW Oriental Room Smallmin.jpg",
        "FileSize": 31755,
        "IsImage": true,
        "Sizes": [{
            "Name": "thumb",
            "Height": 112,
            "Width": 150,
            "Url": "/local-media/5c1ccbac8ad49c181c12f028/size/thumb-1545391203323.jpg"
        }]
    },
    "ModifiedDate": "2019-06-26T06:42:44.752Z"
}, {
    "_id": "5c4710559e7cfb1ea48853ef",
    "Name": "The Poolside",
    "IsMain": false,
    "Schedule": [],
    "Image": {
        "ID": "5c1cc86b8ad49c181c12f026",
        "Name": "BW The Poolside Banner.jpg",
        "AltText": "Black Watch The Poolside",
        "Url": "/local-media/5c1cc86b8ad49c181c12f026/BW The Poolside Bannermin.jpg",
        "FileSize": 123988,
        "IsImage": true,
        "Sizes": [{
            "Name": "thumb",
            "Height": 72,
            "Width": 150,
            "Url": "/local-media/5c1cc86b8ad49c181c12f026/size/thumb-1574182960195.jpg"
        }]
    },
    "FeatureBoxImage": {
        "ID": "5c1cc8f3b5cf1707ac419bdd",
        "Name": "BW The Poolside Small.jpg",
        "AltText": "Black Watch The Poolside",
        "Url": "/local-media/5c1cc8f3b5cf1707ac419bdd/BW The Poolside Smallmin.jpg",
        "FileSize": 56214,
        "IsImage": true,
        "Sizes": [{
            "Name": "thumb",
            "Height": 112,
            "Width": 150,
            "Url": "/local-media/5c1cc8f3b5cf1707ac419bdd/size/thumb-1574182974716.jpg"
        }]
    },
    "ModifiedDate": "2019-06-26T06:42:44.760Z"
}, {
    "_id": "5b890c0a9efdc413a8a693b8",
    "Name": "The Orchid Room",
    "IsMain": false,
    "Schedule": [],
    "Image": {
        "ID": "5c1cc142b5cf1707ac419bd5",
        "Name": "Orchid Room Banner.jpg",
        "AltText": "Black Watch Orchid Room",
        "Url": "/local-media/5c1cc142b5cf1707ac419bd5/Orchid Room Bannermin.jpg",
        "FileSize": 161483,
        "IsImage": true,
        "Sizes": [{
            "Name": "thumb",
            "Height": 72,
            "Width": 150,
            "Url": "/local-media/5c1cc142b5cf1707ac419bd5/size/thumb-1545388412446.jpg"
        }]
    },
    "FeatureBoxImage": {
        "ID": "5c94d99f8492d920e8c4906a",
        "Name": "Orchid Room Small.jpg",
        "AltText": "Orchid Room",
        "Url": "/local-media/5c94d99f8492d920e8c4906a/Orchid Room Smallmin 1.jpg",
        "FileSize": 75348,
        "IsImage": true,
        "Sizes": [{
            "Name": "thumb",
            "Height": 112,
            "Width": 150,
            "Url": "/local-media/5c94d99f8492d920e8c4906a/size/thumb-1553258941876.jpg"
        }]
    },
    "ModifiedDate": "2019-06-26T06:42:44.749Z"
}, {
    "_id": "5b890bee9efdc413a8a693b4",
    "Name": "The Glentanar",
    "IsMain": true,
    "AppOrder": null,
    "Schedule": [],
    "Image": {
        "ID": "5c13799fbd1be61938f2f067",
        "Name": "BWGlentanar.png",
        "AltText": "Black Watch Glentanar Restaurant",
        "Url": "/local-media/5c13799fbd1be61938f2f067/BWGlentanar.png",
        "FileSize": 282390,
        "IsImage": true,
        "Sizes": [{
            "Name": "thumb",
            "Height": 76,
            "Width": 150,
            "Url": "/local-media/5c13799fbd1be61938f2f067/size/thumb-1544780203790.png"
        }]
    },
    "FeatureBoxImage": {
        "ID": "5c137d51bd1be61938f2f070",
        "Name": "BW-Glentanar-Small.png",
        "AltText": "Black Watch Glentanar Restaurant",
        "Url": "/local-media/5c137d51bd1be61938f2f070/BWGlentanarSmall.png",
        "FileSize": 114536,
        "IsImage": true,
        "Sizes": [{
            "Name": "thumb",
            "Height": 112,
            "Width": 150,
            "Url": "/local-media/5c137d51bd1be61938f2f070/size/thumb-1544781157764.png"
        }]
    },
    "ModifiedDate": "2020-01-06T10:27:52.962Z"
}, {
    "_id": "5b890bf69efdc413a8a693b6",
    "Name": "The Black Watch Room",
    "IsMain": false,
    "Schedule": [],
    "Image": {
        "ID": "5c1cc6cbb5cf1707ac419bdb",
        "Name": "Black Watch Room Banner.jpg",
        "AltText": "Black Watch Room",
        "Url": "/local-media/5c1cc6cbb5cf1707ac419bdb/Black Watch Room Bannermin.jpg",
        "FileSize": 101075,
        "IsImage": true,
        "Sizes": [{
            "Name": "thumb",
            "Height": 72,
            "Width": 150,
            "Url": "/local-media/5c1cc6cbb5cf1707ac419bdb/size/thumb-1545390185903.jpg"
        }]
    },
    "FeatureBoxImage": {
        "ID": "5c1cc5128ad49c181c12f024",
        "Name": "Black Watch Room Small.jpg",
        "AltText": "Black Watch Room",
        "Url": "/local-media/5c1cc5128ad49c181c12f024/Black Watch Room Smallmin.jpg",
        "FileSize": 49544,
        "IsImage": true,
        "Sizes": [{
            "Name": "thumb",
            "Height": 112,
            "Width": 150,
            "Url": "/local-media/5c1cc5128ad49c181c12f024/size/thumb-1545390186107.jpg"
        }]
    },
    "ModifiedDate": "2019-06-26T06:42:44.748Z"
}]

My Model class

import 'dart:convert';

List<RestaurantResponseModel> restaurantResponseModelFromJson(String str) => List<RestaurantResponseModel>.from(json.decode(str).map((x) => RestaurantResponseModel.fromJson(x)));

String restaurantResponseModelToJson(List<RestaurantResponseModel> data) => json.encode(List<dynamic>.from(data.map((x) => x.toJson())));

class RestaurantResponseModel {
  RestaurantResponseModel({
    this.id,
    this.name,
    this.isMain,
    this.schedule,
    this.images,
    this.featureBoxImages,
    this.modifiedDate,
    this.appOrder,
  });

  String? id;
  String? name;
  bool? isMain;
  List<dynamic>? schedule;
  Images? images;
  Images? featureBoxImages;
  DateTime? modifiedDate;
  dynamic? appOrder;

  factory RestaurantResponseModel.fromJson(Map<String, dynamic> json) => RestaurantResponseModel(
    id: json["_id"],
    name: json["Name"],
    isMain: json["IsMain"],
    schedule: List<dynamic>.from(json["Schedule"].map((x) => x)),
    images: Images.fromJson(json["Images"]),
    featureBoxImages: Images.fromJson(json["FeatureBoxImages"]),
    modifiedDate: DateTime.parse(json["ModifiedDate"]),
    appOrder: json["AppOrder"],
  );

  Map<String, dynamic> toJson() => {
    "_id": id,
    "Name": name,
    "IsMain": isMain,
    "Schedule": List<dynamic>.from(schedule!.map((x) => x)),
    "Images": images!.toJson(),
    "FeatureBoxImages": featureBoxImages!.toJson(),
    "ModifiedDate": modifiedDate!.toIso8601String(),
    "AppOrder": appOrder,
  };
}

class Images {
  Images({
    this.id,
    this.name,
    this.altText,
    this.url,
    this.fileSize,
    this.isImages,
    this.sizes,
  });

  String? id;
  String? name;
  String? altText;
  String? url;
  int? fileSize;
  bool? isImages;
  List<Size>? sizes;

  factory Images.fromJson(Map<String, dynamic> json) => Images(
    id: json["ID"],
    name: json["Name"],
    altText: json["AltText"],
    url: json["Url"],
    fileSize: json["FileSize"],
    isImages: json["IsImages"],
    sizes: List<Size>.from(json["Sizes"].map((x) => Size.fromJson(x))),
  );

  Map<String, dynamic> toJson() => {
    "ID": id,
    "Name": name,
    "AltText": altText,
    "Url": url,
    "FileSize": fileSize,
    "IsImages": isImages,
    "Sizes": List<dynamic>.from(sizes!.map((x) => x.toJson())),
  };
}

class Size {
  Size({
    this.name,
    this.height,
    this.width,
    this.url,
  });

  Name? name;
  int? height;
  int? width;
  String? url;

  factory Size.fromJson(Map<String, dynamic> json) => Size(
    name: nameValues.map[json["Name"]],
    height: json["Height"],
    width: json["Width"],
    url: json["Url"],
  );

  Map<String, dynamic> toJson() => {
    "Name": nameValues.reverse[name],
    "Height": height,
    "Width": width,
    "Url": url,
  };
}

enum Name { THUMB }

final nameValues = EnumValues({
  "thumb": Name.THUMB
});

class EnumValues<T> {
  Map<String, T> map;
  Map<T, String>? reverseMap;

  EnumValues(this.map);

  Map<T, String> get reverse {
    if (reverseMap == null) {
      reverseMap = map.map((k, v) => new MapEntry(v, k));
    }
    return reverseMap!;
  }
}
Vinay Bakle
  • 133
  • 13

1 Answers1

0

Null check operator used on null

This means that you did something like this:

print(myNullableVariable!);

That is to say, you put a null variable followed by an !, and the variable was null.

Here is every time you used !

"Images": images!.toJson(),
"FeatureBoxImages": featureBoxImages!.toJson(),
"ModifiedDate": modifiedDate!.toIso8601String(),
"Sizes": List<dynamic>.from(sizes!.map((x) => x.toJson())),
return reverseMap!;

that last one is the least likely one to be an issue because you assign reverseMap a few lines above.

This means that either images, featureBoxImages, modifiedDate or sizes are null. Here is my best guess as to which, but the error should have given you a line in which you made the null check, it would be helpful if you told me what that line says.

images is assigned as follows: Images.fromJson(json["Images"]),, but your json never assigns 'Images', my guess is that you meant 'Image'.

Something similar happens with featureBoxImages, which you assign using 'FeatureBoxImages', but on your JSON you use 'FeatureBoxImage'.

modifiedDate looks good to me, I don't think it's null, but maybe there is a chance DateTime.parse returns null?

sizes also look good to me, I don't think it is the problem.

Hopefully one of the changes that I mentioned solves your problem!

h8moss
  • 4,626
  • 2
  • 9
  • 25