Proposal.fromJson constructor
Proposal.fromJson(
- Map<String, dynamic> json
)
Implementation
factory Proposal.fromJson(Map<String, dynamic> json) {
return Proposal(
actions: json['Actions'] != null
? ProposalActions.fromJson(json['Actions'] as Map<String, dynamic>)
: null,
creationDate: timeStampFromJson(json['CreationDate']),
description: json['Description'] as String?,
expirationDate: timeStampFromJson(json['ExpirationDate']),
networkId: json['NetworkId'] as String?,
noVoteCount: json['NoVoteCount'] as int?,
outstandingVoteCount: json['OutstandingVoteCount'] as int?,
proposalId: json['ProposalId'] as String?,
proposedByMemberId: json['ProposedByMemberId'] as String?,
proposedByMemberName: json['ProposedByMemberName'] as String?,
status: (json['Status'] as String?)?.toProposalStatus(),
yesVoteCount: json['YesVoteCount'] as int?,
);
}