ChannelCounters.fromMap constructor
ChannelCounters.fromMap(
- Map<String, dynamic>? json
)
Implementation
ChannelCounters.fromMap(Map<String, dynamic>? json) {
if (json != null) {
joined = json['joined'];
members = json['members'];
unreads = json['unreads'] != null ? json['unreads'] : 0;
unreadsFrom = json['unreadsFrom'] != null
? DateTime.parse(json['unreadsFrom'])
: null;
msgs = json['msgs'];
latest = json['latest'] != null ? DateTime.parse(json['latest']) : null;
userMentions = json['userMentions'];
success = json['success'];
}
}