deserializeByClassName method

  1. @override
dynamic deserializeByClassName(
  1. Map<String, dynamic> data
)

Deserialize the provided json data by using the className stored in the data.

Implementation

@override
dynamic deserializeByClassName(Map<String, dynamic> data) {
  if (data['className'] == 'AppleAuthInfo') {
    return deserialize<_i2.AppleAuthInfo>(data['data']);
  }
  if (data['className'] == 'AuthenticationFailReason') {
    return deserialize<_i3.AuthenticationFailReason>(data['data']);
  }
  if (data['className'] == 'AuthenticationResponse') {
    return deserialize<_i4.AuthenticationResponse>(data['data']);
  }
  if (data['className'] == 'EmailAuth') {
    return deserialize<_i5.EmailAuth>(data['data']);
  }
  if (data['className'] == 'EmailCreateAccountRequest') {
    return deserialize<_i6.EmailCreateAccountRequest>(data['data']);
  }
  if (data['className'] == 'EmailFailedSignIn') {
    return deserialize<_i7.EmailFailedSignIn>(data['data']);
  }
  if (data['className'] == 'EmailPasswordReset') {
    return deserialize<_i8.EmailPasswordReset>(data['data']);
  }
  if (data['className'] == 'EmailReset') {
    return deserialize<_i9.EmailReset>(data['data']);
  }
  if (data['className'] == 'GoogleRefreshToken') {
    return deserialize<_i10.GoogleRefreshToken>(data['data']);
  }
  if (data['className'] == 'UserImage') {
    return deserialize<_i11.UserImage>(data['data']);
  }
  if (data['className'] == 'UserInfo') {
    return deserialize<_i12.UserInfo>(data['data']);
  }
  if (data['className'] == 'UserInfoPublic') {
    return deserialize<_i13.UserInfoPublic>(data['data']);
  }
  if (data['className'] == 'UserSettingsConfig') {
    return deserialize<_i14.UserSettingsConfig>(data['data']);
  }
  return super.deserializeByClassName(data);
}