openNewsArticle static method
openNewsArticle
Opens a news article in the widget
Available Platforms
Web, Android, iOS
Implementation
static Future<void> openNewsArticle(
{required String articleId, required bool showBackButton}) async {
if (!kIsWeb && !io.Platform.isAndroid && !io.Platform.isIOS) {
debugPrint(
'openNewsArticle is not available for current operating system',
);
return;
}
await _channel.invokeMethod('openNewsArticle',
{'articleId': articleId, 'showBackButton': showBackButton});
}