papyrus 0.1.1 copy "papyrus: ^0.1.1" to clipboard
papyrus: ^0.1.1 copied to clipboard

Secure policy-driven federated native WebView for Flutter with navigation, resource, and permission controls.

Papyrus #

A policy-driven federated native WebView for Flutter. Papyrus embeds the platform system WebView on each supported target and exposes a uniform, conservative-by-default API for loading, navigation, resource control, security, storage, and interaction policy.

Papyrus is designed for controlled HTML rendering — document viewers, email HTML renderers, sandboxed content panels — not as a general-purpose browser shell.

Features #

  • PapyrusView widget with a PapyrusController for programmatic control
  • Policy-first design: security, navigation, storage, and interaction policies
  • Runtime capability detection via PapyrusController.getCapabilities()
  • Resource interception with custom response injection
  • Ephemeral / partitioned storage profiles
  • Print, snapshot, auto-height, clearCache, clearStorage
  • Structured error reporting (PapyrusError, PapyrusNavigationBlockedError, PapyrusWebViewUnavailableError)

Platform support #

Platform Engine Embedded view Resource interception Ephemeral storage
Android Android System WebView
iOS WKWebView
macOS WKWebView ✓ (overlay)
Windows WebView2 ✓ (overlay) Partial
Linux WebKitGTK ✓ (overlay) Feasible

Getting started #

dependencies:
  papyrus: ^0.1.0

Usage #

import 'package:papyrus/papyrus.dart';

PapyrusView(
  controller: PapyrusController(
    initialRequest: PapyrusLoadRequest.url('https://example.com'),
    securityPolicy: PapyrusSecurityPolicy(
      allowInsecureContent: false,
      allowFileAccess: false,
    ),
  ),
)

Platform-specific setup #

macOS #

Add com.apple.security.network.client to both DebugProfile.entitlements and Release.entitlements in your macOS runner.

Windows #

Microsoft Edge WebView2 Runtime must be installed on the end-user machine. See the papyrus_windows README for packaging options.

Linux #

Install WebKitGTK development packages (libwebkit2gtk-4.1-0 on Ubuntu 22.04+). See the papyrus_linux README for distribution-specific details.

Additional information #

0
likes
160
points
92
downloads

Documentation

API reference

Publisher

verified publisherdizitart.com

Weekly Downloads

Secure policy-driven federated native WebView for Flutter with navigation, resource, and permission controls.

Homepage
Repository (GitHub)
View/report issues

License

Apache-2.0 (license)

Dependencies

flutter, papyrus_android, papyrus_ios, papyrus_linux, papyrus_macos, papyrus_platform_interface, papyrus_windows

More

Packages that depend on papyrus

Packages that implement papyrus