webview_sdk Free
Self-contained WebView feature SDK backed by
flutter_inappwebview. Provides URL loading, navigation controls, progress tracking, one-way JS calls, and URI scheme interception.
Version: 1.1.0
Independent of webview_sdk_advanced
webview_sdk and webview_sdk_advanced are two completely independent bricks — pick whichever one your project needs. webview_sdk_advanced does not require webview_sdk to be installed first, and does not extend or build on it. Installing both is not a supported layering model.
Variables
This brick has no configuration variables. Generation is non-interactive.
Generated Package
| Package | Description |
|---|---|
webview | Contract + flutter_inappwebview implementation, self-contained in one package: navigation controls, progress tracking, and URI scheme interception. |
Usage
Interactive
archipelago generate webview_sdkNon-interactive (CI)
archipelago generate webview_sdk --config my_config.jsonGenerated Structure
features/
└── webview/
└── webview/
└── lib/src/
├── webview_controller.dart
├── webview_sdk.dart
├── webview_sdk_impl.dart
├── webview_inappwebview_controller.dart
├── di/
└── models/Platform Setup
Android — Internet Permission
<uses-permission android:name="android.permission.INTERNET" />iOS — App Transport Security
For HTTP (non-HTTPS) URLs, add to ios/Runner/Info.plist:
<key>NSAppTransportSecurity</key>
<dict>
<key>NSAllowsArbitraryLoads</key>
<true/>
</dict>For HTTPS-only apps this is not required.
Embedding the Widget
final controller = getIt<WebViewSDK>().createController(
const WebViewConfig(
initialUrl: 'https://example.com',
interceptedSchemes: ['app', 'tg'],
),
) as WebViewInAppWebViewController;
InAppWebView(
initialUrlRequest: URLRequest(url: WebUri(config.initialUrl)),
onWebViewCreated: (c) => controller.attachNativeController(c),
shouldOverrideUrlLoading: controller.shouldOverrideUrlLoading,
onProgressChanged: controller.onProgressChanged,
onLoadStart: controller.onLoadStart,
onLoadStop: controller.onLoadStop,
onReceivedError: controller.onReceivedError,
);URI Scheme Interception
controller.interceptStream.listen((event) {
// event.url → Uri, e.g. app://trade/BTC
// event.scheme → e.g. 'app'
Navigator.pushNamed(context, '/trade/${event.url.pathSegments.last}');
});One-Way JavaScript Calls
await controller.runJavaScript('window.showBanner("hello")');This package has no bidirectional JS bridge and no mini-app support. For those capabilities, install the independent webview_sdk_advanced brick.