SceneMetadata.fromJson constructor

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

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

Implementation

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