shareToStory method
Bot API 7.8+ A method that opens the native story editor with the media specified in the media_url parameter as an HTTPS URL. An optional params argument of the type StoryShareParams describes additional sharing settings.
Implementation
@override
void shareToStory(String mediaUrl, {StoryShareParams? params}) {
Telegram.WebApp.shareToStory(
mediaUrl,
params != null
? StoryShareParamsJSObject(
text: params.text,
widget_link: params.widgetLink != null
? StoryWidgetLinkJSObject(
url: params.widgetLink!.url,
name: params.widgetLink?.name,
)
: null,
)
: null,
);
}