uploadProfileImage static method

Future<String> uploadProfileImage({
  1. required Uint8List data,
})

Implementation

static Future<String> uploadProfileImage({
  required Uint8List data,
}) async {
  HeraRequest req = HeraRequest()
    ..namespace = _namespace
    ..accessToken = (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;
}