Skip to content
This repository was archived by the owner on Feb 22, 2023. It is now read-only.

Commit 081f1ef

Browse files
committed
Fix bug in example
By ensuring that flutter widget bindings are initialized. The current version fails on startup.
1 parent 3e547d9 commit 081f1ef

File tree

3 files changed

+6
-1
lines changed

3 files changed

+6
-1
lines changed

packages/camera/CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
## 0.5.8+3
2+
3+
* Fix bug in usage example in README.md
4+
15
## 0.5.8+2
26

37
* Post-v2 embedding cleanups.

packages/camera/README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,7 @@ import 'package:camera/camera.dart';
5353
List<CameraDescription> cameras;
5454
5555
Future<void> main() async {
56+
WidgetsFlutterBinding.ensureInitialized();
5657
cameras = await availableCameras();
5758
runApp(CameraApp());
5859
}

packages/camera/pubspec.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ name: camera
22
description: A Flutter plugin for getting information about and controlling the
33
camera on Android and iOS. Supports previewing the camera feed, capturing images, capturing video,
44
and streaming image buffers to dart.
5-
version: 0.5.8+2
5+
version: 0.5.8+3
66

77
homepage: https://github.com/flutter/plugins/tree/master/packages/camera
88

0 commit comments

Comments
 (0)