fromJson static method

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

Create a new instance from a json

Implementation

static GetMessageResponse fromJson(Map<String, dynamic> json) {
  final res = _$GetMessageResponseFromJson(json);
  final jsonChannel = res.message.extraData.remove('channel');
  if (jsonChannel != null) {
    res.channel = ChannelModel.fromJson(jsonChannel as Map<String, dynamic>);
  }
  return res;
}