useLink method
- bool? signedUp,
Uses the ChatDirectLinkSlug.
Implementation
Future<void> useLink({bool? signedUp}) async {
linkStatus.value = RxStatus.loading();
try {
if (status.value.isEmpty) {
router.home(signedUp: signedUp);
}
router.dialog(
await _authService.useChatDirectLink(_link),
_authService.userId,
);
linkStatus.value = RxStatus.empty();
} on UseChatDirectLinkException catch (e) {
linkStatus.value = RxStatus.empty();
MessagePopup.error(e.toMessage());
} catch (e) {
linkStatus.value = RxStatus.empty();
MessagePopup.error(e);
rethrow;
}
}