MessageResponseData.carousel constructor

MessageResponseData.carousel(
  1. Map<String, dynamic> json
)

Implementation

factory MessageResponseData.carousel(Map<String, dynamic> json) {
  var buttons = json["buttons"] as List;
  return MessageResponseData(
      message: json["message"] ?? "",
      description: json["description"] ?? "",
      mediaUrl: json["mediaUrl"] ?? "",
      title: json["title"],
      buttons: buttons.map((e) => CarouselButton.fromJson(e)).toList(),
      action: json['actions']);
}