Channel.fromJson constructor

Channel.fromJson(
  1. Map _json
)

Implementation

Channel.fromJson(core.Map _json)
    : this(
        address: _json.containsKey('address')
            ? _json['address'] as core.String
            : null,
        expiration: _json.containsKey('expiration')
            ? _json['expiration'] as core.String
            : null,
        id: _json.containsKey('id') ? _json['id'] as core.String : null,
        kind: _json.containsKey('kind') ? _json['kind'] as core.String : null,
        params: _json.containsKey('params')
            ? (_json['params'] as core.Map<core.String, core.dynamic>).map(
                (key, item) => core.MapEntry(
                  key,
                  item as core.String,
                ),
              )
            : null,
        payload: _json.containsKey('payload')
            ? _json['payload'] as core.bool
            : null,
        resourceId: _json.containsKey('resourceId')
            ? _json['resourceId'] as core.String
            : null,
        resourceUri: _json.containsKey('resourceUri')
            ? _json['resourceUri'] as core.String
            : null,
        token:
            _json.containsKey('token') ? _json['token'] as core.String : null,
        type: _json.containsKey('type') ? _json['type'] as core.String : null,
      );