📣 important note
- Android keyboard cannot be appear according to this flutter issue 19718
- Not support scrollview
support
- Can embedded in widget tree ✅
- Pull to refresh (true / false) ✅
- Add header ✅
- Add userAgent ✅
- Can handl all webview callback method ✅
- Can call evaluateJavascript ✅
- Can load HTML ✅
io.flutter.embedded_views_preview
and the value YES
in Info.plist
dependencies:
flutter:
sdk: flutter
web_vuw:
See Full example in example
Basic
new WebVuw(
initialUrl: 'www.url.com',
enableJavascript: true,
pullToRefresh: true,
header: {
.....
}
userAgent: 'userAgent',
// to load html string
// html: '<body><h1>this is web vuw</h1></body>',
gestureRecognizers: <Factory<OneSequenceGestureRecognizer>>[
Factory<OneSequenceGestureRecognizer>(
() => EagerGestureRecognizer(),
),
].toSet(),
javaScriptMode: JavaScriptMode.unrestricted,
onWebViewCreated: (WebVuwController webViewController) {
_controller.complete(webViewController);
}
)
// ...
StreamSubscription _ssWebVuwEvents;
@override
Widget build(BuildContext context) {
return FutureBuilder<WebVuwController>(
future: _controller.future,
builder:
(BuildContext context, AsyncSnapshot<WebVuwController> snapshot) {
final webViewReady =
snapshot.connectionState == ConnectionState.done;
final controller = snapshot.data;
if (webViewReady) {
// You can now call the functions
// controller.stopLoading();
_ssWebVuwEvents = controller.onEvents().listen((events) {
print('Events 😎=> $events');
});
}
...
@override
void dispose() {
if (_ssWebVuwEvents != null) _ssWebVuwEvents.cancel();
super.dispose();
}
..
Future<void> loadUrl(String url);
Future<bool> canGoBack();
Future<bool> canGoForward();
Future<void> goBack();
Future<void> goForward();
Future<void> stopLoading();
Future<void> reload();
Future<void> forward();
Future<dynamic> evaluateJavascript(String javascriptString);
Future<void> loadHtml(String html);
Stream onEvents;
example/README.md
Demonstrates how to use the web_vuw plugin.
This project is a starting point for a Flutter application.
A few resources to get you started if this is your first Flutter project:
For help getting started with Flutter, view our online documentation, which offers tutorials, samples, guidance on mobile development, and a full API reference.
Add this to your package's pubspec.yaml file:
dependencies:
web_vuw: ^0.2.2
You can install packages from the command line:
with Flutter:
$ flutter packages get
Alternatively, your editor might support flutter packages get
.
Check the docs for your editor to learn more.
Now in your Dart code, you can use:
import 'package:web_vuw/web_vuw.dart';
Version | Uploaded | Documentation | Archive |
---|---|---|---|
0.2.2 | Jan 29, 2019 |
|
|
0.2.1 | Jan 27, 2019 |
|
|
0.2.0 | Jan 27, 2019 |
|
|
0.1.6 | Jan 19, 2019 |
|
|
0.1.5 | Jan 19, 2019 |
|
|
0.1.4 | Jan 17, 2019 |
|
|
0.1.3 | Jan 17, 2019 |
|
|
0.1.2 | Dec 16, 2018 |
|
|
0.1.1 | Dec 13, 2018 |
|
|
0.1.0 | Dec 13, 2018 |
|
|
Popularity:
Describes how popular the package is relative to other packages.
[more]
|
76
|
Health:
Code health derived from static analysis.
[more]
|
100
|
Maintenance:
Reflects how tidy and up-to-date the package is.
[more]
|
100
|
Overall:
Weighted score of the above.
[more]
|
88
|
We analyzed this package on Feb 20, 2019, and provided a score, details, and suggestions below. Analysis was completed with status completed using:
Detected platforms: Flutter
References Flutter, and has no conflicting libraries.
Package | Constraint | Resolved | Available |
---|---|---|---|
Direct dependencies | |||
Dart SDK | >=2.0.0-dev.68.0 <3.0.0 | ||
flutter | 0.0.0 | ||
flutter_test | 0.0.0 | ||
Transitive dependencies | |||
async | 2.0.8 | ||
boolean_selector | 1.0.4 | ||
charcode | 1.1.2 | ||
collection | 1.14.11 | ||
matcher | 0.12.3+1 | 0.12.4 | |
meta | 1.1.6 | 1.1.7 | |
path | 1.6.2 | ||
pedantic | 1.4.0 | 1.5.0 | |
quiver | 2.0.1 | ||
sky_engine | 0.0.99 | ||
source_span | 1.5.4 | ||
stack_trace | 1.9.3 | ||
stream_channel | 1.6.8 | ||
string_scanner | 1.0.4 | ||
term_glyph | 1.1.0 | ||
test_api | 0.2.2 | ||
typed_data | 1.1.6 | ||
vector_math | 2.0.8 |