deserializeByClassName method
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<_i3.AppleAuthInfo>(data['data']);
}
if (data['className'] == 'AuthKey') {
return deserialize<_i4.AuthKey>(data['data']);
}
if (data['className'] == 'AuthenticationFailReason') {
return deserialize<_i5.AuthenticationFailReason>(data['data']);
}
if (data['className'] == 'AuthenticationResponse') {
return deserialize<_i6.AuthenticationResponse>(data['data']);
}
if (data['className'] == 'EmailAuth') {
return deserialize<_i7.EmailAuth>(data['data']);
}
if (data['className'] == 'EmailCreateAccountRequest') {
return deserialize<_i8.EmailCreateAccountRequest>(data['data']);
}
if (data['className'] == 'EmailFailedSignIn') {
return deserialize<_i9.EmailFailedSignIn>(data['data']);
}
if (data['className'] == 'EmailPasswordReset') {
return deserialize<_i10.EmailPasswordReset>(data['data']);
}
if (data['className'] == 'EmailReset') {
return deserialize<_i11.EmailReset>(data['data']);
}
if (data['className'] == 'GoogleRefreshToken') {
return deserialize<_i12.GoogleRefreshToken>(data['data']);
}
if (data['className'] == 'UserImage') {
return deserialize<_i13.UserImage>(data['data']);
}
if (data['className'] == 'UserInfo') {
return deserialize<_i14.UserInfo>(data['data']);
}
if (data['className'] == 'UserInfoPublic') {
return deserialize<_i15.UserInfoPublic>(data['data']);
}
if (data['className'] == 'UserSettingsConfig') {
return deserialize<_i16.UserSettingsConfig>(data['data']);
}
if (data['className'].startsWith('serverpod.')) {
data['className'] = data['className'].substring(10);
return _i2.Protocol().deserializeByClassName(data);
}
return super.deserializeByClassName(data);
}