TokenData.fromJson constructor
TokenData.fromJson(
- Map<String, dynamic> json
)
Implementation
factory TokenData.fromJson(Map<String, dynamic> json) => TokenData(
id: json["id"],
campaign: Campaign.fromJson(json["campaign"]),
socketToken: json["socketToken"],
page: json["page"],
title: json["title"],
logo: Logo.fromJson(json["logo"]),
button: Branding.fromJson(json["button"]),
branding: Branding.fromJson(json["branding"]),
bot: Bot.fromJson(json["bot"]),
body: Body.fromJson(json["body"]),
multipleInteractions: json["multipleInteractions"],
showAgentNames: json["showAgentNames"],
queue: json["queue"],
welcomeButtons: json["welcomeButtons"] == null
? []
: List<String?>.from(json["welcomeButtons"]!.map((x) => x)),
website: json["website"],
active: json["active"],
template: json["template"],
socialMedia: json["socialMedia"],
socialChannels: json["socialChannels"] == null
? []
: List<dynamic>.from(json["socialChannels"]!.map((x) => x)),
chatBotHeader: json["chatBotHeader"],
chatBotHeaderDescription: json["chatBotHeaderDescription"],
chatBotName: json["chatBotName"],
fileStore: json["fileStore"],
iat: json["iat"],
exp: json["exp"],
);