openwebf/webf
Overview
This skill installs and configures WebF native plugins to expose platform capabilities (sharing, camera, payments, geolocation, etc.) to JavaScript running in WebF. It explains the two-part installation (Flutter package + npm package), how to register plugin modules, and common usage patterns for feature detection, error handling, and permissions. The goal is to let web developers call native APIs reliably across iOS, Android, and desktop hosts.
How this skill works
Each native plugin consists of a Flutter package that implements native functionality and an npm package that exposes a JavaScript API. You add the Flutter package to the host app's pubspec.yaml, register the module with WebF.defineModule() in main.dart, and install the corresponding npm package in your web project. JavaScript code then calls the plugin API; the WebF module bridges those calls to platform code.
When to use it
- When you need device features not available or reliable in standard web APIs (camera, native sharing, payments).
- To get native-accurate geolocation, push notifications, or biometric authentication.
- When file system access or saving screenshots to device storage is required.
- To integrate native calendars, contacts, or platform sensors (accelerometer, gyroscope).
- When building cross-platform WebF apps that must use platform-specific capabilities.
Best practices
- Always check the plugin registry first to avoid reinventing functionality.
- Install both sides: add the Flutter package and the npm package, and register the module before runApp().
- Wrap plugin calls in try/catch and provide a web fallback if the module is missing.
- Test on all target platforms and document platform-specific behaviors and required permissions.
- Keep plugins up to date and read changelogs before upgrading.
Example use cases
- Share text, URLs, or images from a WebF app using the Share plugin.
- Capture or pick photos with native camera access and save screenshots to device storage.
- Request native geolocation for higher accuracy than the browser API.
- Implement biometric login backed by native Face ID / fingerprint APIs.
- Process payments using a native payments plugin for better UX and compliance.
FAQ
Yes. Every native plugin requires a Flutter package in the host app and an npm package in the JavaScript project. The Flutter package provides native code and the npm package exposes JS types and helpers.
What if a plugin works on iOS but not Android?
Check platform permissions and required native configuration. Review the plugin docs for platform-specific setup and ensure AndroidManifest.xml or Info.plist entries are present.
7 skills
This skill helps you integrate native WebF plugins to access camera, payments, geolocation, and more from JavaScript in Flutter apps.
This skill guides you to set up WebF hybrid routing with native transitions, enabling multi-screen navigation and correct back behavior.
This skill guides you through creating reusable WebF native plugins by wrapping Flutter packages into JavaScript APIs for cross-platform access.
This skill helps you build native UI libraries for WebF by wrapping Flutter widgets into web elements with React and Vue support.
This skill helps you accelerate iOS-style UI development by leveraging WebF Cupertino components for native Flutter performance and seamless React or Vue
This skill helps you quickly start WebF projects with Vite, set up WebF Go testing, and load your first app efficiently.
This skill quickly reveals WebF API and CSS compatibility, guiding feature planning and providing alternatives for unsupported features.