TokenData.fromJson constructor

TokenData.fromJson(
  1. Map<String, dynamic> json
)

Implementation

factory TokenData.fromJson(Map<String, dynamic> json) {
  return TokenData(
    expirationTime: json['ExpirationTime'] as String?,
    licenseArn: json['LicenseArn'] as String?,
    roleArns: (json['RoleArns'] as List?)
        ?.whereNotNull()
        .map((e) => e as String)
        .toList(),
    status: json['Status'] as String?,
    tokenId: json['TokenId'] as String?,
    tokenProperties: (json['TokenProperties'] as List?)
        ?.whereNotNull()
        .map((e) => e as String)
        .toList(),
    tokenType: json['TokenType'] as String?,
  );
}