Token.fromJson constructor

Token.fromJson(
  1. Map json_
)

Implementation

Token.fromJson(core.Map json_)
    : this(
        anonymous: json_.containsKey('anonymous')
            ? json_['anonymous'] as core.bool
            : null,
        clientId: json_.containsKey('clientId')
            ? json_['clientId'] as core.String
            : null,
        displayText: json_.containsKey('displayText')
            ? json_['displayText'] as core.String
            : null,
        etag: json_.containsKey('etag') ? json_['etag'] as core.String : null,
        kind: json_.containsKey('kind') ? json_['kind'] as core.String : null,
        nativeApp: json_.containsKey('nativeApp')
            ? json_['nativeApp'] as core.bool
            : null,
        scopes: json_.containsKey('scopes')
            ? (json_['scopes'] as core.List)
                .map((value) => value as core.String)
                .toList()
            : null,
        userKey: json_.containsKey('userKey')
            ? json_['userKey'] as core.String
            : null,
      );