uploadProfileImage static method
Implementation
static Future<String> uploadProfileImage({
required Uint8List data,
}) async {
HeraRequest req = HeraRequest()
..namespace = _namespace
..authToken = AuthToken(userToken: await getAccessToken())
..user = (currentUser());
HeraResponse res = await _heraClient.uploadProfileImage(
HeraExtenstion.imageStream(data, req, (_) => HeraRequest(data: _)),
);
_currentUser.profile.profileImage = res.user.profile.profileImage;
return res.user.profile.profileImage.url;
}