Votes.fromJson constructor
Implementation
factory Votes.fromJson(Map<String, Object?> json) {
return Votes(
hasVoted: json[r'hasVoted'] as bool? ?? false,
self: json[r'self'] as String?,
voters: (json[r'voters'] as List<Object?>?)
?.map(
(i) => User.fromJson(i as Map<String, Object?>? ?? const {}))
.toList() ??
[],
votes: (json[r'votes'] as num?)?.toInt(),
);
}