ImageMessageNode.fromJson constructor

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

Implementation

ImageMessageNode.fromJson(Map<String, dynamic> json)
    : super(MessageElemTypeEnum.Image) {
  if (json['path'] != null) path = json['path'];
  if (json['imageData'] != null) {
    _imageData = Map();
    (json['imageData'] as List).forEach((v) {
      ImageEntity imageEntity = ImageEntity.fromJson(v);
      _imageData![imageEntity.type!] = imageEntity;
    });
  }
}