onMessageLinkTap function

Future<void> onMessageLinkTap(
  1. Uri uri,
  2. dynamic context
)

Implementation

Future<void> onMessageLinkTap(Uri uri, BuildContext context) async {
  final roomId = getRoomIdFromLink(uri);

  ///If link is type of matrix room link
  if (roomId != null) {
    goToChat(context, roomId);
  }

  ///If link is other than matrix room link
  ///Then open it on browser
  else {
    await openLink(uri.toString(), context);
  }
}