isAdmin method

  1. @override
Future<bool?> isAdmin(
  1. String userJid,
  2. String groupJID
)
override

Implementation

@override
Future<bool?> isAdmin(String userJid, String groupJID) async {
  bool? response;
  try {
    response = await mirrorFlyMethodChannel.invokeMethod<bool>(
        'isAdmin', {"jid": userJid, "group_jid": groupJID});
    debugPrint("isAdmin Result ==> $response");
    return response;
  } on PlatformException catch (e) {
    debugPrint("Platform Exception ===> $e");
    return false;
  } on Exception catch (error) {
    debugPrint("Exception ==> $error");
    return false;
  }
}