Candidate.fromJson constructor

Candidate.fromJson(
  1. Map json_
)

Implementation

Candidate.fromJson(core.Map json_)
    : this(
        candidateUrl: json_.containsKey('candidateUrl')
            ? json_['candidateUrl'] as core.String
            : null,
        channels: json_.containsKey('channels')
            ? (json_['channels'] as core.List)
                .map((value) => Channel.fromJson(
                    value as core.Map<core.String, core.dynamic>))
                .toList()
            : null,
        email:
            json_.containsKey('email') ? json_['email'] as core.String : null,
        name: json_.containsKey('name') ? json_['name'] as core.String : null,
        orderOnBallot: json_.containsKey('orderOnBallot')
            ? json_['orderOnBallot'] as core.String
            : null,
        party:
            json_.containsKey('party') ? json_['party'] as core.String : null,
        phone:
            json_.containsKey('phone') ? json_['phone'] as core.String : null,
        photoUrl: json_.containsKey('photoUrl')
            ? json_['photoUrl'] as core.String
            : null,
      );