Skip to content
pubscout

camera_web

0.3.6, released 2 weeks ago by flutter.dev

Web platform implementation for the Flutter camera plugin.

WASM-ready
$ flutter pub add camera_web
Source repository

What it does

Provides the web-specific implementation for the camera plugin, allowing Flutter apps to control camera devices, take pictures, and record video on web browsers. It uses the Stream, Image Capture, and MediaRecorder Web APIs.

AI-written summary of version 0.3.6, based on the package's README and metadata. Report an inaccuracy

Use it when

  • You are developing a Flutter web application that needs to capture photos or record videos from a device camera.
  • You are using the endorsed federated camera package and need web support included automatically.

Skip it when

  • Your application requires features missing on the web implementation, such as exposure modes, focus control, or sensor orientation.
  • You are running in an insecure context (non-HTTPS) where browser permissions for camera access will be denied.

Strengths

  • Automatically included when using the main camera package via endorsed federation.
  • Supports taking pictures, video recording, and camera image streaming on supported browsers.
  • Migrated to package:web to fully support WASM.

Weaknesses

  • Missing several advanced features available on mobile platforms like exposure and focus mode/point.
  • Relies on browser support for Web APIs such as MediaRecorder and Image Capture which may vary.
  • Requires a secure browsing context (HTTPS or localhost).

Setup

Kind
Plugin (native code)
Effort
Low
Code generation
No
Direct dependencies
3

Serve your web application over HTTPS or localhost for local development to ensure secure context requirements are met for camera access.

final Image image;
if (kIsWeb) {
  image = Image.network(capturedImage.path);
} else {
  image = Image.file(File(capturedImage.path));
}

Alternatives

Packages that do the same job and could replace camera_web.

Works with

Packages commonly used together with camera_web: ones it builds on, ones built on it, and its own family.