getUserProfile method

  1. @override
Future getUserProfile(
  1. String jid, [
  2. bool fromserver = false,
  3. bool saveasfriend = false
])
override

Implementation

@override
Future<dynamic> getUserProfile(String jid,
    [bool fromserver = false, bool saveasfriend = false]) async {
  //getProfile
  dynamic profileResponse;
  try {
    profileResponse = await mirrorFlyMethodChannel.invokeMethod(
        'getUserProfile',
        {"jid": jid, "server": fromserver, "saveasfriend": saveasfriend});
    debugPrint("getUserProfile Result ==> $profileResponse");
    //insertDefaultStatusToUser();
    return profileResponse;
  } on PlatformException catch (e) {
    debugPrint("Platform Exception ===> $e");
    rethrow;
  } on Exception catch (error) {
    debugPrint("Exception ==> $error");
    rethrow;
  }
}