fromDynamic static method

TestImage fromDynamic(
  1. dynamic map
)

Implementation

static TestImage fromDynamic(dynamic map) {
  late TestImage result;

  if (map == null) {
    throw Exception('[TestImage.fromDynamic]: map is null');
  } else {
    result = TestImage(
      captureTime: JsonClass.parseInt(map['captureTime']),
      goldenCompatible: JsonClass.parseBool(map['goldenCompatible']),
      hash: map['hash'],
      id: map['id'],
      image: map['image'] == null ? null : base64.decode(map['image']),
    );
  }

  return result;
}