Help us understand the problem. What is going on with this article?

flutter勉強21日目

Flutterで外部のURLを開くにはWebviewを使います。

Webview

Step1: pubspec.ymlファイル中のdependenciesの下にwebview_flutterのパッケージを追加します。
Step2: Webviewウィジェットを作ります。二つのプロパティーが必要です。

  • initialUrl :開きたいURLはここに書きます。
  • javascriptMode : JavascriptMode.unrestrictedに設定します。

使う例は以下です。

class WebViewWidget extends StatelessWidget {

  @Override
  Widget build(BuildContext context) {

    return Scaffold(
      appBar: AppBar(
        title: Text('Webview example'),
      ), // AppBar
      body: Webview(
        initialUrl: 'https://flutter.dev/',
        javascriptMode: JavascriptMode.unrestricted,
      ),
    );
  }
}

参考になる記事は以下です:

https://medium.com/@chloe.thhsu/%E5%A6%82%E4%BD%95%E5%9C%A8-flutter-%E4%B8%AD%E4%BD%BF%E7%94%A8-webview-%E5%B0%8F%E5%A5%B3-android-%E5%B7%A5%E7%A8%8B%E5%B8%AB%E5%AF%A6%E9%A9%97%E7%AD%86%E8%A8%98-75969b36abba

Why do not you register as a user and use Qiita more conveniently?
  1. We will deliver articles that match you
    By following users and tags, you can catch up information on technical fields that you are interested in as a whole
  2. you can read useful information later efficiently
    By "stocking" the articles you like, you can search right away
Comments
Sign up for free and join this conversation.
If you already have a Qiita account
Why do not you register as a user and use Qiita more conveniently?
You need to log in to use this function. Qiita can be used more conveniently after logging in.
You seem to be reading articles frequently this month. Qiita can be used more conveniently after logging in.
  1. We will deliver articles that match you
    By following users and tags, you can catch up information on technical fields that you are interested in as a whole
  2. you can read useful information later efficiently
    By "stocking" the articles you like, you can search right away