initListener static method

void initListener(
  1. dynamic onLinkReceived(
    1. Uri
    )
)

Implementation

static void initListener(Function(Uri) onLinkReceived) {
  _sub = uriLinkStream.listen((Uri? uri) {
    if (uri != null) {
      log('Received URI: $uri');
      onLinkReceived(uri);
    }
  }, onError: (err) {
    log('URI Error: $err');
  });
}