updateChatHeadIcon method

  1. @override
Future<void> updateChatHeadIcon(
  1. String id,
  2. Uint8List rgbaBytes,
  3. int width,
  4. int height,
)
override

Replaces the chathead icon with raw RGBA pixel data.

id identifies which bubble to update. rgbaBytes contains the pixel data in RGBA order, with dimensions width × height.

On Android the bitmap is created off the main thread; on iOS the chathead is already a Flutter view so this is a no-op.

Implementation

@override
Future<void> updateChatHeadIcon(
  String id,
  Uint8List rgbaBytes,
  int width,
  int height,
) async {
  lastIconId = id;
  lastIconBytes = rgbaBytes;
}