SmartSceneMetadata.fromJson constructor

SmartSceneMetadata.fromJson(
  1. Map<String, dynamic> dataMap
)

Creates a SmartSceneMetadata object from the JSON response to a GET request.

Implementation

factory SmartSceneMetadata.fromJson(Map<String, dynamic> dataMap) {
  return SmartSceneMetadata(
    name: dataMap[ApiFields.name] ?? "",
    image: Relative.fromJson(
        Map<String, dynamic>.from(dataMap[ApiFields.image] ?? {})),
  );
}