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

A comprehensive Flutter plugin that provides cross-platform iframe functionality for Android, iOS, Web, Linux, Windows, and macOS.

Iframe Plugin for Flutter #

A comprehensive Flutter plugin that provides cross-platform iframe functionality for Android, iOS, Web, Linux, Windows, and macOS.

pub package

Features #

  • Create iframes with customizable properties (width, height, allow, sandbox, etc.)
  • Navigate to different URLs
  • Reload iframe content
  • Get current iframe URL
  • Execute JavaScript in iframe context
  • Control iframe visibility
  • Full platform support (Android, iOS, Web, Linux, Windows, macOS)

Installation #

Add iframe as a dependency in your pubspec.yaml file:

dependencies:
  iframe: ^1.0.0

Usage #

Import the package in your Dart code:

import 'package:iframe/iframe.dart';

Create an instance of the Iframe plugin:

final iframe = Iframe();

Create an iframe #

await iframe.create(
  url: 'https://flutter.dev',
  width: 400,
  height: 300,
  allow: 'fullscreen',
  sandbox: 'allow-scripts',
);
await iframe.navigate('https://dart.dev');

Reload the iframe #

await iframe.reload();

Get current URL #

String? currentUrl = await iframe.getCurrentUrl();

Execute JavaScript #

await iframe.executeScript('document.title');

Control visibility #

await iframe.setVisible(true); // or false

Platform Support #

Platform Status
Android
iOS
Web
Linux
Windows
macOS

Example #

Check out the example directory for a complete sample app.

License #

MIT

0
likes
150
points
19
downloads

Publisher

unverified uploader

Weekly Downloads

A comprehensive Flutter plugin that provides cross-platform iframe functionality for Android, iOS, Web, Linux, Windows, and macOS.

Repository (GitHub)
View/report issues

Topics

#iframe #webview #cross-platform #browser #embedding

Documentation

Documentation
API reference

License

MIT (license)

Dependencies

flutter, flutter_web_plugins, plugin_platform_interface, web

More

Packages that depend on iframe

Packages that implement iframe