getAvatar method

Future<DynamiteResponse<Uint8List, void>> getAvatar({
  1. required String guestName,
  2. required String size,
  3. GuestAvatarGetAvatarDarkTheme? darkTheme,
})

Returns a guest avatar image response.

Returns a Future containing a DynamiteResponse with the status code, deserialized body and headers. Throws a DynamiteApiException if the API call does not return an expected status code.

Parameters:

  • guestName The guest name, e.g. "Albert".
  • size The desired avatar size, e.g. 64 for 64x64px.
  • darkTheme Return dark avatar. Defaults to 0.

Status codes:

  • 200: Custom avatar returned
  • 201: Avatar returned
  • 500

See:

Implementation

Future<_i1.DynamiteResponse<Uint8List, void>> getAvatar({
  required String guestName,
  required String size,
  GuestAvatarGetAvatarDarkTheme? darkTheme,
}) async {
  final _request = $getAvatar_Request(
    guestName: guestName,
    size: size,
    darkTheme: darkTheme,
  );
  final _streamedResponse = await _rootClient.httpClient.send(_request);
  final _response = await _i3.Response.fromStream(_streamedResponse);

  final _serializer = $getAvatar_Serializer();
  return _i1.ResponseConverter<Uint8List, void>(_serializer).convert(_response);
}