BannerButtonComponent.fromJson constructor

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

Implementation

factory BannerButtonComponent.fromJson(Map<String, dynamic> json) {
  return BannerButtonComponent(
    type: json['type'],
    id: json['id'],
    customPayload: json['customPayload'],
    text: json['text'],
    actionUrl: json['actionUrl'],
    products: (json['products'] as List<dynamic>?)
        ?.map((e) => STRProductItem.fromJson(e))
        .toList(),
  );
}