shareFriendRequestLink method

Future<void> shareFriendRequestLink(
  1. String currentUserId
)

Shares a friend request link via the SharePlus package @param currentUserId The ID of the current user to include in the link

Implementation

Future<void> shareFriendRequestLink(String currentUserId) async {
  try {
    final link = await DeepLinkService.generateFriendRequestLink(currentUserId);
    SharePlus.instance.share(
      ShareParams(
        text: 'Add me as a friend on FitOffice@DHBW!\n$link',
        subject: 'Friend Request'
      )
    );
  } catch (e) {
    debugPrint('Link Generation Failed');
    Helper.errorSnackBar(title: 'Share Error', message: 'Could not generate friend request link');
  }
}