simple_webview_bridge 1.0.0 copy "simple_webview_bridge: ^1.0.0" to clipboard
simple_webview_bridge: ^1.0.0 copied to clipboard

A Flutter WebView widget that automatically injects app context (app ID and platform) into web pages via postMessage API

example/main.dart

import 'package:flutter/material.dart';
import 'package:simple_webview_bridge/simple_webview_bridge.dart';

void main() {
  runApp(MyApp());
}

class MyApp extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      title: 'SimpleWebViewBridge Example',
      theme: ThemeData(
        primarySwatch: Colors.blue,
      ),
      home: WebViewExample(),
    );
  }
}

class WebViewExample extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(
        title: Text('SimpleWebViewBridge Example'),
      ),
      body: SimpleWebViewBridge(
        initialUrl: 'https://example.com',
        onPageStarted: (url) {
          print('Page started loading: $url');
        },
        onPageFinished: (url) {
          print('Page finished loading: $url');
        },
      ),
    );
  }
}
0
likes
150
points
1
downloads

Publisher

unverified uploader

Weekly Downloads

A Flutter WebView widget that automatically injects app context (app ID and platform) into web pages via postMessage API

Repository (GitHub)
View/report issues

Topics

#webview #bridge #postmessage #flutter #widget

Documentation

Documentation
API reference

License

MIT (license)

Dependencies

flutter, package_info_plus, webview_flutter

More

Packages that depend on simple_webview_bridge