deleteSession method Null safety

Future<NIMResult<void>> deleteSession(
  1. {required NIMSessionInfo sessionInfo,
  2. required NIMSessionDeleteType deleteType,
  3. required bool sendAck}
)

Delete a conversation. After you call the API, the SDK will trigger the MessageService.onSessionDelete notification.

deleteType Specify the deletion strategy (whether to delete local messages and roaming messages)

sendAck Specify whether to mark the conversation as "read" on other devices when sessionInfo and deleteType are valid.

Implementation

Future<NIMResult<void>> deleteSession({
  required NIMSessionInfo sessionInfo,
  required NIMSessionDeleteType deleteType,
  required bool sendAck,
}) {
  return _platform.deleteSession(
    sessionInfo: sessionInfo,
    deleteType: deleteType,
    sendAck: sendAck,
  );
}