sendImageMessage method

  1. @override
Future<V2TimValueCallback<V2TimMessage>> sendImageMessage({
  1. required String imagePath,
  2. required String receiver,
  3. required String groupID,
  4. int priority = 0,
  5. bool onlineUserOnly = false,
  6. bool isExcludedFromUnreadCount = false,
  7. Map<String, dynamic>? offlinePushInfo,
  8. String? fileName,
  9. Uint8List? fileContent,
})
override

发送图片消息

web 端发送图片消息时需要传入fileName、fileContent 字段

Implementation

@override
Future<V2TimValueCallback<V2TimMessage>> sendImageMessage(
    {required String imagePath,
    required String receiver,
    required String groupID,
    int priority = 0,
    bool onlineUserOnly = false,
    bool isExcludedFromUnreadCount = false,
    Map<String, dynamic>? offlinePushInfo,
    String? fileName,
    Uint8List? fileContent}) async {
  return await _v2timMessageManager.sendImageMessage<V2TimValueCallback<V2TimMessage>, V2TimMessage>({
    "imagePath": imagePath,
    "receiver": receiver,
    "groupID": groupID,
    "priority": priority,
    "onlineUserOnly": onlineUserOnly,
    "isExcludedFromUnreadCount": isExcludedFromUnreadCount,
    "offlinePushInfo": offlinePushInfo,
    "fileName": fileName,
    "fileContent": fileContent
  });
}