Auth<K extends AuthKeys>.from constructor

Auth<K extends AuthKeys>.from(
  1. Object? source
)

Implementation

factory Auth.from(Object? source) {
  if (source is Auth<K>) return source;
  final key = AuthKeys.i;
  return Auth(
    id: source.entityValue(key.id),
    timeMills: source.entityValue(key.timeMills),
    accessToken: source.entityValue(key.accessToken),
    age: source.entityValue(key.age),
    anonymous: source.entityValue(key.anonymous),
    biometric: source.entityValue(key.biometric),
    email: source.entityValue(key.email),
    extra: source.entityValue(key.extra, (value) {
      return value is Map<String, dynamic> ? value : {};
    }),
    gender: source.entityValue(key.gender),
    idToken: source.entityValue(key.idToken),
    loggedIn: source.entityValue(key.loggedIn),
    loggedInTime: source.entityValue(key.loggedInTime),
    loggedOutTime: source.entityValue(key.loggedOutTime),
    name: source.entityValue(key.name),
    online: source.entityValue(key.online),
    password: source.entityValue(key.password),
    path: source.entityValue(key.path),
    phone: source.entityValue(key.phone),
    photo: source.entityValue(key.photo),
    platform: source.entityValue(key.platform),
    provider: source.entityValue(key.provider),
    random: source.entityValue(key.random),
    token: source.entityValue(key.token),
    username: source.entityValue(key.username),
    verified: source.entityValue(key.verified),
  );
}