NewYour coding agent can read the release notes before it upgrades.Set up the MCP server →
pub.dev · #765 most downloaded on pub.dev
A Flutter plugin for getting information about and controlling the camera on Web.
Last release 29 days ago
08 Sep 2026
Ships unpredictably
gaps range from 2 weeks to 1.3 years
Nearly every release is documented
notes for 29 of 29 stable releases
Nothing withdrawn
no release was ever pulled
5 years old
29 releases · first in 2021
One column per quarter.
Migrates to package:web to support WASM
Uses CanvasRenderingContext2D.drawImage instead of the deprecated drawImageScaled.
CanvasRenderingContext2D.drawImage instead of the deprecated drawImageScaled.Fixes camera initialization failure on Firefox Android by using {video: true} instead of {video: {}} when no video constraints are specified.
{video: true} instead
of {video: {}} when no video constraints are specified.Fixes camera initialization failure on Safari by fixing a null check operator error using a nullable getter and null-safe practices.
Fixes a TypeError in availableCameras() caused by browsers (e.g. Firefox) returning an invalid facingMode capability value instead of the expected DOM
TypeError in availableCameras() caused by browsers (e.g. Firefox) returning
an invalid facingMode capability value instead of the expected DOMString sequence.Removes invalid @JS annotation from extension type constructors.
setFlashMode and takePicture threw on any camera that has a flash.
setFlashMode and takePicture threw on any camera that has a flash.
The Image Capture specification declares sequence<boolean> torch in
MediaTrackCapabilities. package:web is generated from that specification, so
torchNullable was typed JSArray<JSBoolean>?.
No browser ships that shape. Chromium and WebKit both declare a bare boolean torch.
Reading the property threw before the torch could be applied. The error depends on
the compiler:
| Compiler | Error |
|---|---|
| DDC | TypeError: true: type 'bool' is not a subtype of type 'JSArray<Object?>?' |
| dart2js | NoSuchMethodError: method not found: 'gq' |
| dart2wasm | ArgumentError: Invalid argument(s) |
The same line held two more defects:
.first gave the wrong answer for [false, true]. A specification-shaped sequence.first threw StateError on an empty sequence.Read torch as JSAny? and add canEnableTorch, which accepts either shape and
returns false for anything else.
A sequence is answered with any instead of first, and is only trusted when every
element is a boolean. Anything unrecognised raises torchModeNotSupported instead of
crashing, and prints a debug-only warning so the shape can be reported.
| Browser reports | Before | After |
|---|---|---|
true |
TypeError | torch on |
false |
TypeError | torchModeNotSupported |
[false, true] |
wrong answer | torch on |
[true] |
torch on | torch on |
[false] |
torchModeNotSupported | torchModeNotSupported |
[] |
StateError | torchModeNotSupported |
| key absent | torchModeNotSupported | torchModeNotSupported |
'yes' |
TypeError | torchModeNotSupported + warning |
['yes'] |
TypeError | torchModeNotSupported + warning |
Nine cases are covered by integration tests. Six of them fail without this change.
All nine shapes were run through the real plugin code on each of these. All passed.
| Device | Browser | Result |
|---|---|---|
| Moto G56 5G, Android 16 | Chrome 151 | 9 / 9 |
| macOS 26.3 | Safari 26.3 | 9 / 9 |
| iPhone 17 Pro simulator, iOS 26.1 | Safari | 9 / 9 |
| macOS 26.3 | Chrome 151, dart2js and dart2wasm | 9 / 9 |
On the Moto G56 the rear camera reports torch: true as a bare boolean, and the flash
now turns on. The front camera does not report the key at all and raises
torchModeNotSupported as expected.
canEnableTorch on NonStandardFieldsOnMediaTrackCapabilities, which reads either shape.debugPrint warning for a shape that is neither, so an unknown browser can0.3.5+6.JSArray<JSBoolean>? type on torchNullable, which no browser matches.?.toDart.first.toDart ?? false chain in _setTorchMode.Fixes flutter/flutter#191384
🤖 Generated with Claude Code
TypeError in setFlashMode and takePicture caused by browsers reporting the
torch capability as a boolean instead of the boolean sequence the Image Capture
specification describes.Removes maxVideoDuration/maxDuration, as the feature was never exposed at the app-facing package level, and is deprecated at the platform interface le…
maxVideoDuration/maxDuration, as the feature was never exposed at
the app-facing package level, and is deprecated at the platform interface
level.Adds support to control video FPS and bitrate. See CameraController.withSettings.
CameraController.withSettings.Changes availableCameras to not ask for the microphone permission.
availableCameras to not ask for the microphone permission.Updates README to improve example of Image creation.
Image creation.Adds pub topics to package metadata.
Updates minimum supported SDK version to Flutter 3.13.0/Dart 3.1.0.
dart:ui_web APIs.Updates minimum supported SDK version to Flutter 3.10/Dart 3.0.
Updates to latest camera platform interface, and fails if user attempts to use streaming with recording (since streaming is currently unsupported on w
Updates code for stricter lint checks.
Updates links for the merge of flutter/plugins into flutter/packages.
Clarifies explanation of endorsement in README.
Removes obsolete null checks on non-nullable values.
BREAKING CHANGE: Renames error code cameraPermission to CameraAccessDenied to be consistent with other platforms.
cameraPermission to CameraAccessDenied to be consistent with other platforms.Updates imports for prefer_relative_imports.
prefer_relative_imports.Add video recording functionality.
* Update usage documentation.
Fixes cameraNotReadable error that prevented access to the camera on some Android devices when initializing a camera.
Internal code cleanup for stricter analysis options.
Migrates from ui.hash* to Object.hash*.
ui.hash* to Object.hash*.Fixes library_private_types_in_public_api, sort_child_properties_last and use_key_in_widget_constructors lint warnings.
Minor fixes for new analysis options.
Initial release, adapted from the Flutter I/O Photobooth project.
Your coding agent can read these notes before it upgrades. Set up the MCP server →