sendImageMessage method Null safety

  1. @Deprecated('sendImageMessage has been deprecated since 3.6.0, we separate the creation of the message from the sending of the message, please use createImageMessage to create a message first, and then call sendMessage to send the message')
Future<V2TimValueCallback<V2TimMessage>> sendImageMessage(
  1. {required String imagePath,
  2. required String receiver,
  3. required String groupID,
  4. MessagePriorityEnum priority = MessagePriorityEnum.V2TIM_PRIORITY_NORMAL,
  5. bool onlineUserOnly = false,
  6. bool isExcludedFromUnreadCount = false,
  7. OfflinePushInfo? offlinePushInfo,
  8. String? fileName,
  9. Uint8List? fileContent}
)
@Deprecated('sendImageMessage has been deprecated since 3.6.0, we separate the creation of the message from the sending of the message, please use createImageMessage to create a message first, and then call sendMessage to send the message')

Send image message

When sending a picture message on the web side, you need to pass in the fileName and fileContent fields

Implementation

@Deprecated(
 'sendImageMessage has been deprecated since 3.6.0, we separate the creation of the message from the sending of the message, please use createImageMessage to create the message first, and then call sendMessage to send the message')
Future<V2TimValueCallback<V2TimMessage> ;> sendImageMessage(
 {required String imagePath,
 required String receiver,
 required String groupID,
 MessagePriorityEnum priority = MessagePriorityEnum.V2TIM_PRIORITY_NORMAL,
 bool onlineUserOnly = false,
 bool isExcludedFromUnreadCount = false,
 OfflinePushInfo ? offlinePushInfo,
 String? fileName,
 Uint8List? fileContent}) async {
 return ImFlutterPlatform.instance.sendImageMessage(
 imagePath: imagePath,
 receiver: receiver,
 groupID: groupID,
 priority: EnumUtils .convertMessagePriorityEnum(priority),
 onlineUserOnly: onlineUserOnly,
 isExcludedFromUnreadCount: isExcludedFromUnreadCount,
 offlinePushInfo: offlinePushInfo?.toJson(),
 fileName: fileName,
 fileContent: fileContent);
}