https://github.com/ponnamkarthik/flutterwebview
Flutter Plugin that Renders Native Webview as a widget in flutter
https://github.com/ponnamkarthik/flutterwebview
android dart flutter
Last synced: 6 months ago
JSON representation
Flutter Plugin that Renders Native Webview as a widget in flutter
- Host: GitHub
- URL: https://github.com/ponnamkarthik/flutterwebview
- Owner: ponnamkarthik
- License: other
- Created: 2018-09-11T19:15:23.000Z (about 7 years ago)
- Default Branch: master
- Last Pushed: 2019-05-27T11:28:34.000Z (over 6 years ago)
- Last Synced: 2025-04-09T20:05:16.803Z (6 months ago)
- Topics: android, dart, flutter
- Language: Java
- Size: 6.89 MB
- Stars: 62
- Watchers: 4
- Forks: 26
- Open Issues: 15
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# flutter_native_web
Native WebView as a widget in flutter
Inline WebView in flutter using [AndroidView](https://docs.flutter.io/flutter/widgets/AndroidView-class.html) and [UiKitView](https://docs.flutter.io/flutter/widgets/UiKitView-class.html)
# Supported
* Android
* iOS> Note
> * Keypad is not working (No Support by flutter)
> * Basic example of using in a ListView: https://github.com/peeto/scrollable_flutter_web_view_example> * onPageStarted, onPageFinished Only works with Android
## Screenshot
## How to Use
```yaml
dependencies:
flutter_native_web: "^1.0.2"
``````dart
import 'package:flutter_native_web/flutterwebview.dart';
```
```dartWebController webController;
FlutterWebView flutterWebView = new FlutterWebView(
onWebCreated: onWebCreated,
);
```
```dart
new Container(
child: flutterWebViewString,
height: 300.0,
width: 500.0,
),
```
```dart
void onWebCreated(webController) {
this.webController = webController;
this.webController.loadUrl("https://facebook.com");
this.webController.onPageStarted.listen((url) =>
print("Loading $url")
);
this.webController.onPageFinished.listen((url) =>
print("Finished loading $url")
);
}
```## or
```dart
String html = 'Hello world! HTML5 rocks!';void onWebCreated(webController) {
this.webController = webController;
this.webController.loadData(html);
this.webController.onPageStarted.listen((url) =>
print("Loading $url")
);
this.webController.onPageFinished.listen((url) =>
print("Finished loading $url")
);
}
```### Android
Ensure the following permission is present in your Android Manifest file, located in project `/android/app/src/main/AndroidManifest.xml`:
```xml
```
### iOS
Opt-in to the embedded views preview by adding a boolean property to the app's `Info.plist` file
with the key `io.flutter.embedded_views_preview` and the value `YES`.```plist
io.flutter.embedded_views_preview
YES
```## Coming soon
* JSInterface
* more (suggest)