toJson method

  1. @override
Map<String, Object?> toJson()

Implementation

@override
Map<String, Object?> toJson() => {
      "id": encodeValue(id),
      if (label != null) "label": encodeValue(label),
      "token_type": encodeValue(tokenType),
      "issued_at": encodeValue(issuedAt),
      if (updatedAt != null) "updated_at": encodeValue(updatedAt),
      if (expiresAt != null) "expires_at": encodeValue(expiresAt),
      "status": encodeValue(status),
      "active": encodeValue(active),
      if (revokedAt != null) "revoked_at": encodeValue(revokedAt),
      if (lastUsedAt != null) "last_used_at": encodeValue(lastUsedAt),
      if (usageCount != null) "usage_count": encodeValue(usageCount),
    };