Token constructor

Token({
  1. String? id,
  2. String? userId,
  3. bool? blocked,
  4. String? deviceInfo,
  5. Timestamp? blockedAt,
  6. Timestamp? createdAt,
  7. Timestamp? usedAt,
  8. Timestamp? expiresAt,
  9. String? accessToken,
  10. String? refreshToken,
  11. String? loggedInFrom,
  12. TokenType? type,
})

Implementation

factory Token({
  $core.String? id,
  $core.String? userId,
  $core.bool? blocked,
  $core.String? deviceInfo,
  $1.Timestamp? blockedAt,
  $1.Timestamp? createdAt,
  $1.Timestamp? usedAt,
  $1.Timestamp? expiresAt,
  $core.String? accessToken,
  $core.String? refreshToken,
  $core.String? loggedInFrom,
  TokenType? type,
}) {
  final _result = create();
  if (id != null) {
    _result.id = id;
  }
  if (userId != null) {
    _result.userId = userId;
  }
  if (blocked != null) {
    _result.blocked = blocked;
  }
  if (deviceInfo != null) {
    _result.deviceInfo = deviceInfo;
  }
  if (blockedAt != null) {
    _result.blockedAt = blockedAt;
  }
  if (createdAt != null) {
    _result.createdAt = createdAt;
  }
  if (usedAt != null) {
    _result.usedAt = usedAt;
  }
  if (expiresAt != null) {
    _result.expiresAt = expiresAt;
  }
  if (accessToken != null) {
    _result.accessToken = accessToken;
  }
  if (refreshToken != null) {
    _result.refreshToken = refreshToken;
  }
  if (loggedInFrom != null) {
    _result.loggedInFrom = loggedInFrom;
  }
  if (type != null) {
    _result.type = type;
  }
  return _result;
}