• flutter webview


    https://flutter-examples.com/flutter-open-web-url-in-app-using-webview/


    2. Find dependencies line and put webview_flutter: ^0.3.19+6 just after it.

    Complete source code for my pubspec.yaml file after making changes:

    3. Open your current folder project Root folder in Command Prompt or Terminal and execute flutter pub get command like i did in below screenshot.

    Now your flutter project is ready to use the official flutter WebView plugin. Next step is start coding for app.

    4. Open your project’s main.dart file and import material.dart and webview_flutter.dart plugin.

    5. Create void main runApp() method and here we would call our main MyApp root class.

    6. Create our main Root class named as MyApp extends with State less widget. In this class we would call the WebViewLoad class in body area.

    7. Create WebViewLoad class extends StatefulWidget. In this class we would call the createState() method of flutter State management and define the next child class with it.

    8. Create our main child class named as WebViewLoadUI extends with State.

    9. Creating Widget Build area in WebViewLoadUI class and in the body section we would call the WebView widget.

    • initialUrl : The Web URL which would display when WebView starts.
    • javascriptMode : To enable and disable JavaScript on current displaying URL.

    10. Complete source code for main.dart file:

    Screenshot:

  • 相关阅读:
    C 语言 字符串命令 strstr()的用法 实现将原字符串以分割串分割输出
    C# 中对 IEnumerable IEnumerator yield 的理解
    C 语言 用字符输出菱形图案的函数(可自定义边长及字符样式)
    C 语言 对角线添充二维数组
    C 语言 边读 边写入文件
    [转]Page.RegisterRequiresRaiseEvent()与Page.RegisterRequiresPostBack()
    asp.net 判断是手机或电脑访问网页的方式
    表达式树【转】
    ADO.NET中的“返回多个结果集”和“MARS”【转】
    SQL2005转2000的方法【转】
  • 原文地址:https://www.cnblogs.com/xujinzhong/p/13031905.html
Copyright © 2020-2023  润新知