updateFavouriteStatus method

  1. @override
Future updateFavouriteStatus(
  1. String messageID,
  2. String chatUserJID,
  3. bool isFavourite,
  4. String chatType,
)
override

Implementation

@override
Future<dynamic> updateFavouriteStatus(String messageID, String chatUserJID,
    bool isFavourite, String chatType) async {
  //favouriteMessage
  dynamic favResponse;
  try {
    favResponse =
        await mirrorFlyMethodChannel.invokeMethod('updateFavouriteStatus', {
      "messageID": messageID,
      "chatUserJID": chatUserJID,
      "isFavourite": isFavourite,
      "chatType": chatType,
    });
    debugPrint("Favourite Msg Response ==> $favResponse");
    return favResponse;
  } on PlatformException catch (e) {
    debugPrint("Platform Exception ===> $e");
    rethrow;
  } on Exception catch (error) {
    debugPrint("Exception ==> $error");
    rethrow;
  }
}