clearChat method

  1. @override
Future clearChat(
  1. String jid,
  2. String chatType,
  3. bool clearExceptStarred
)
override

Implementation

@override
Future<dynamic> clearChat(
    String jid, String chatType, bool clearExceptStarred) async {
  dynamic clearChatResponse;
  try {
    clearChatResponse = await mirrorFlyMethodChannel.invokeMethod(
        'clear_chat', {
      "jid": jid,
      "chat_type": chatType,
      "clear_except_starred": clearExceptStarred
    });
    debugPrint("clear chat Response ==> $clearChatResponse");
    return clearChatResponse;
  } on PlatformException catch (e) {
    debugPrint("Platform Exception ===> $e");
    rethrow;
  } on Exception catch (error) {
    debugPrint("Exception ==> $error");
    rethrow;
  }
}