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

A Flutter package that embeds Apache Superset dashboards inside a WebView with automatic dark/light theme support. Applies a CSS filter technique to work around cross-origin iframe restrictions.

superset_bridge #

A Flutter package that embeds Apache Superset dashboards inside a WebView with automatic dark/light theme support. It uses a CSS filter hack to apply dark-mode on cross-origin iframes and provides a simple Dart controller for interaction.

Features #

  • Generate self-contained HTML string containing Superset embed code.
  • Toggle dark/light mode without reloading the WebView.
  • Optional token fetch or manual token injection.

Usage #

import 'package:superset_bridge/superset_bridge.dart';

// 1. create a controller
final bridge = SupersetBridgeController();

// 2. generate HTML
final html = SupersetBridgeHtmlContent.generate(
  dashboardId: 'your-uuid',
  domain: 'https://superset.example.com',
  theme: 'light',
);

// 3. load HTML into InAppWebView
InAppWebView(
  onWebViewCreated: (c) => bridge.attach(c),
  initialData: InAppWebViewInitialData(
    data: html,
    mimeType: 'text/html',
    encoding: 'utf-8',
  ),
);

// 4. switch theme dynamically
await bridge.updateUI(theme: 'dark');

For more details, see the library code and the example in the repository.

1
likes
0
points
508
downloads

Publisher

unverified uploader

Weekly Downloads

A Flutter package that embeds Apache Superset dashboards inside a WebView with automatic dark/light theme support. Applies a CSS filter technique to work around cross-origin iframe restrictions.

Homepage
Repository (GitHub)
View/report issues

License

unknown (license)

Dependencies

flutter, flutter_inappwebview

More

Packages that depend on superset_bridge