setUserImage method

Future<UserProfileModel> setUserImage(
  1. Session session,
  2. ByteData image
)

Sets a new user image for the signed in user.

Implementation

Future<UserProfileModel> setUserImage(
  final Session session,
  final ByteData image,
) async {
  final userId = (await session.authenticated)!.authUserId;

  return UserProfiles.setUserImageFromBytes(
    session,
    userId,
    image.buffer.asUint8List(),
  );
}