Official.fromJson constructor

Official.fromJson(
  1. Map json_
)

Implementation

Official.fromJson(core.Map json_)
    : this(
        address: json_.containsKey('address')
            ? (json_['address'] as core.List)
                .map((value) => SimpleAddressType.fromJson(
                    value as core.Map<core.String, core.dynamic>))
                .toList()
            : null,
        channels: json_.containsKey('channels')
            ? (json_['channels'] as core.List)
                .map((value) => Channel.fromJson(
                    value as core.Map<core.String, core.dynamic>))
                .toList()
            : null,
        emails: json_.containsKey('emails')
            ? (json_['emails'] as core.List)
                .map((value) => value as core.String)
                .toList()
            : null,
        name: json_.containsKey('name') ? json_['name'] as core.String : null,
        party:
            json_.containsKey('party') ? json_['party'] as core.String : null,
        phones: json_.containsKey('phones')
            ? (json_['phones'] as core.List)
                .map((value) => value as core.String)
                .toList()
            : null,
        photoUrl: json_.containsKey('photoUrl')
            ? json_['photoUrl'] as core.String
            : null,
        urls: json_.containsKey('urls')
            ? (json_['urls'] as core.List)
                .map((value) => value as core.String)
                .toList()
            : null,
      );