EntertainmentConfigurationChannel.fromJson constructor
Creates a EntertainmentConfigurationChannel object from the JSON response to a GET request.
Implementation
factory EntertainmentConfigurationChannel.fromJson(
Map<String, dynamic> dataMap) {
return EntertainmentConfigurationChannel(
channelId: dataMap[ApiFields.channelId] ?? 0,
position: EntertainmentConfigurationPosition.fromJson(
Map<String, dynamic>.from(dataMap[ApiFields.position] ?? {})),
members: (dataMap[ApiFields.members] as List<dynamic>?)
?.map((memberMap) =>
EntertainmentConfigurationChannelMember.fromJson(
Map<String, dynamic>.from(memberMap)))
.toList() ??
[],
);
}