NotificationChannel.fromJson constructor

NotificationChannel.fromJson(
  1. Map json_
)

Implementation

NotificationChannel.fromJson(core.Map json_)
    : this(
        creationRecord: json_.containsKey('creationRecord')
            ? MutationRecord.fromJson(json_['creationRecord']
                as core.Map<core.String, core.dynamic>)
            : null,
        description: json_.containsKey('description')
            ? json_['description'] as core.String
            : null,
        displayName: json_.containsKey('displayName')
            ? json_['displayName'] as core.String
            : null,
        enabled: json_.containsKey('enabled')
            ? json_['enabled'] as core.bool
            : null,
        labels: json_.containsKey('labels')
            ? (json_['labels'] as core.Map<core.String, core.dynamic>).map(
                (key, value) => core.MapEntry(
                  key,
                  value as core.String,
                ),
              )
            : null,
        mutationRecords: json_.containsKey('mutationRecords')
            ? (json_['mutationRecords'] as core.List)
                .map((value) => MutationRecord.fromJson(
                    value as core.Map<core.String, core.dynamic>))
                .toList()
            : null,
        name: json_.containsKey('name') ? json_['name'] as core.String : null,
        type: json_.containsKey('type') ? json_['type'] as core.String : null,
        userLabels: json_.containsKey('userLabels')
            ? (json_['userLabels'] as core.Map<core.String, core.dynamic>)
                .map(
                (key, value) => core.MapEntry(
                  key,
                  value as core.String,
                ),
              )
            : null,
        verificationStatus: json_.containsKey('verificationStatus')
            ? json_['verificationStatus'] as core.String
            : null,
      );