Flutter provides many plugins in that you may know about the plugin “Webview”.
On Android,
The Webview widget is backed up by WKWebView
On iOS,
Webview widget is backed up by WebView
Add Package in Main Dart File
At the main dart, enter the basic package
import ‘package:flutter/material.dart’;
Depend Flutter Webview Plugin
- Go to “pubspec.yaml” file.
- Under “cupertino_icons: ^0.1.2”, enter the code
Flutter_webview_plugin: ^0.2.1+2
Install Plugin
- To Install the Flutter webview plugin,
- Tap “Package get” to install.
Import Package File in Main dart file
import 'package:flutter_webview_plugin/flutter_webview_plugin.dart';
Create Class File in Main Dart
class MyApp extends StatefulWidget { @override _MyAppState createState() => _MyAppState(); }
Create Webview Scaffold
Widget build(BuildContext context) { return WebviewScaffold( appBar: AppBar( title: TextField( ), ), url: "https://www.webapptiv.com", ); } }