updateProfile method
Update your user profile information
It needs an authToken with an valid accessToken to succeed
Every non null information given in profile
will be updated
Implementation
Future<Profile> updateProfile({
required AuthToken authToken,
required Profile profile,
}) async {
try {
final newProfileInterface = await _platform.updateProfile(
reachFiveKey: ReachFiveKeyConverter.toInterface(reachFiveKey),
authToken: AuthTokenConverter.toInterface(authToken),
profile: ProfileConverter.toInterface(profile),
);
return ProfileConverter.fromInterface(newProfileInterface);
} catch (error, stackTrace) {
try {
_platform.parseError(error, stackTrace);
} catch (interfaceError, interfaceStackTrace) {
adaptErrors(
error: interfaceError,
stackTrace: interfaceStackTrace,
);
}
}
}