As the title said, how to open youtube, instagram or facebook inside flutter webview? Or is it even possible to do that at all?
And also is there any limitation or restriction for webview in Flutter? Like which website can be or can't be opened inside webview?
CodePudding user response:
Use Web view Widget in flutter
WebView(
initialUrl: 'https://flutter.io',
javascriptMode: JavascriptMode.unrestricted,
),
use Instagram or YouTube URL in initialUrl property follow this link for more detail https://codelabs.developers.google.com/codelabs/flutter-webview#2
CodePudding user response:
Any website can be opened in a flutter webview. To use webview in your app use webview_flutter plugin, and visit the documentation of the plugin for the configuration.
After everything is setup up, use the below Widget with the website name.
WebView(
initialUrl: 'https://flutter.dev',
)