openLink method

  1. @override
void openLink(
  1. String url, {
  2. bool tryInstantView = true,
})
override

A method that opens a link in an external browser. The Mini App will not be closed. Bot API 6.4+ If the optional options parameter is passed with the field try_instant_view=true, the link will be opened in Instant View mode if possible.

Note that this method can be called only in response to user interaction with the Mini App interface (e.g. a click inside the Mini App or on the main button)

Implementation

@override
void openLink(String url, {bool tryInstantView = true}) => Telegram.WebApp.openLink(
      url,
      OpenLinkParamsJSObject(try_instant_view: tryInstantView),
    );