ContainerImage.fromJson constructor

ContainerImage.fromJson(
  1. Map<String, dynamic> json
)

Creates a ContainerImage from JSON data.

Implementation

factory ContainerImage.fromJson(Map<String, dynamic> json) {
  final tempNamesJson = json['names'];
  final tempSizeBytesJson = json['sizeBytes'];

  final List<String>? tempNames =
      tempNamesJson != null ? List<String>.from(tempNamesJson) : null;
  final int? tempSizeBytes = tempSizeBytesJson;

  return ContainerImage(
    names: tempNames,
    sizeBytes: tempSizeBytes,
  );
}