jsonToTemplateClass function
Implementation
dynamic jsonToTemplateClass(TemplateKeys templateKey, Map<String, dynamic> json) {
switch (templateKey) {
case TemplateKeys.ar_location_list_template:
return TemplateArLocationList.fromJson(json);
case TemplateKeys.ar_model_template:
return TemplateArModel.fromJson(json);
case TemplateKeys.carousel_images_template:
return TemplateCarouselImages.fromJson(json);
case TemplateKeys.comparison_images_template:
return TemplateComparisonImages.fromJson(json);
case TemplateKeys.content_list_template:
return TemplateContentList.fromJson(json);
case TemplateKeys.game_images_differences_template:
return TemplateGameImageDifferences.fromJson(json);
case TemplateKeys.game_join_concepts_template:
return TemplateGameJoinConcepts.fromJson(json);
case TemplateKeys.game_puzzle_template:
return TemplateGamePuzzle.fromJson(json);
case TemplateKeys.hotspot_image_template:
return TemplateHotspotImage.fromJson(json);
case TemplateKeys.hotspot_panoramic_video_template:
return TemplatePanoramicVideoHotspot.fromJson(json);
case TemplateKeys.information_screen_template:
return TemplateInformationScreen.fromJson(json);
case TemplateKeys.location_list_template:
return TemplateLocationList.fromJson(json);
case TemplateKeys.panoramic_video_template:
return TemplatePanoramicVideo.fromJson(json);
case TemplateKeys.panoramic_view_template:
return TemplatePanoramicView.fromJson(json);
case TemplateKeys.quiz_template:
return TemplateGameQuiz.fromJson(json);
case TemplateKeys.single_image_template:
return TemplateSingleImage.fromJson(json);
case TemplateKeys.video_template:
return TemplateSingleVideo.fromJson(json);
default:
return null;
}
}