Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion packages/camera/camera/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
## 0.11.4

* Fixes a bug where exceptions thrown during a return statement in an async function were not correctly caught, aligning behavior with expected Dart semantics (see [dart-lang/sdk#44395](https://github.com/dart-lang/sdk/issues/44395)).
* Updates example to demonstrate correct exception handling for async return statements, ensuring exceptions thrown during return are properly caught as per [dart-lang/sdk#44395](https://github.com/dart-lang/sdk/issues/44395).

## 0.11.3+1

* Fixes delivering errors from onCameraError.
Expand Down Expand Up @@ -828,4 +833,4 @@ Method changes:

## 0.0.1

* Initial release
* Initial release
2 changes: 1 addition & 1 deletion packages/camera/camera/example/lib/main.dart
Original file line number Diff line number Diff line change
Expand Up @@ -888,7 +888,7 @@ class _CameraExampleHomeState extends State<CameraExampleHome>
}

try {
return cameraController.stopVideoRecording();
return await cameraController.stopVideoRecording();
} on CameraException catch (e) {
_showCameraException(e);
return null;
Expand Down
8 changes: 4 additions & 4 deletions packages/camera/camera/lib/src/camera_controller.dart
Original file line number Diff line number Diff line change
Expand Up @@ -766,7 +766,7 @@ class CameraController extends ValueNotifier<CameraValue> {
Future<double> getMinExposureOffset() async {
_throwIfNotInitialized('getMinExposureOffset');
try {
return CameraPlatform.instance.getMinExposureOffset(_cameraId);
return await CameraPlatform.instance.getMinExposureOffset(_cameraId);
} on PlatformException catch (e) {
throw CameraException(e.code, e.message);
}
Expand All @@ -776,7 +776,7 @@ class CameraController extends ValueNotifier<CameraValue> {
Future<double> getMaxExposureOffset() async {
_throwIfNotInitialized('getMaxExposureOffset');
try {
return CameraPlatform.instance.getMaxExposureOffset(_cameraId);
return await CameraPlatform.instance.getMaxExposureOffset(_cameraId);
} on PlatformException catch (e) {
throw CameraException(e.code, e.message);
}
Expand All @@ -788,7 +788,7 @@ class CameraController extends ValueNotifier<CameraValue> {
Future<double> getExposureOffsetStepSize() async {
_throwIfNotInitialized('getExposureOffsetStepSize');
try {
return CameraPlatform.instance.getExposureOffsetStepSize(_cameraId);
return await CameraPlatform.instance.getExposureOffsetStepSize(_cameraId);
} on PlatformException catch (e) {
throw CameraException(e.code, e.message);
}
Expand Down Expand Up @@ -833,7 +833,7 @@ class CameraController extends ValueNotifier<CameraValue> {
}

try {
return CameraPlatform.instance.setExposureOffset(_cameraId, offset);
return await CameraPlatform.instance.setExposureOffset(_cameraId, offset);
} on PlatformException catch (e) {
throw CameraException(e.code, e.message);
}
Expand Down
2 changes: 1 addition & 1 deletion packages/camera/camera/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ description: A Flutter plugin for controlling the camera. Supports previewing
Dart.
repository: https://github.com/flutter/packages/tree/main/packages/camera/camera
issue_tracker: https://github.com/flutter/flutter/issues?q=is%3Aissue+is%3Aopen+label%3A%22p%3A+camera%22
version: 0.11.3+1
version: 0.11.4

environment:
sdk: ^3.9.0
Expand Down
4 changes: 4 additions & 0 deletions packages/camera/camera_android/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
## 0.10.10+15

* Updates example to demonstrate correct exception handling for async return statements, ensuring exceptions thrown during return are properly caught as per [dart-lang/sdk#44395](https://github.com/dart-lang/sdk/issues/44395).

## 0.10.10+14

* Bumps com.android.tools.build:gradle from 8.12.1 to 8.13.1.
Expand Down
2 changes: 1 addition & 1 deletion packages/camera/camera_android/example/lib/main.dart
Original file line number Diff line number Diff line change
Expand Up @@ -908,7 +908,7 @@ class _CameraExampleHomeState extends State<CameraExampleHome>
}

try {
return cameraController.stopVideoRecording();
return await cameraController.stopVideoRecording();
} on CameraException catch (e) {
_showCameraException(e);
return null;
Expand Down
2 changes: 1 addition & 1 deletion packages/camera/camera_android/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ description: Android implementation of the camera plugin.
repository: https://github.com/flutter/packages/tree/main/packages/camera/camera_android
issue_tracker: https://github.com/flutter/flutter/issues?q=is%3Aissue+is%3Aopen+label%3A%22p%3A+camera%22

version: 0.10.10+14
version: 0.10.10+15

environment:
sdk: ^3.9.0
Expand Down
6 changes: 5 additions & 1 deletion packages/camera/camera_android_camerax/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
## 0.6.30+1

* Updates example to demonstrate correct exception handling for async return statements, ensuring exceptions thrown during return are properly caught as per [dart-lang/sdk#44395](https://github.com/dart-lang/sdk/issues/44395).

## 0.6.30

* Bump camerax_version from 1.5.2 to 1.5.3.
Expand Down Expand Up @@ -506,4 +510,4 @@ this plugin should now be compatible with [google_ml_kit_flutter](https://github
* Displaying a live camera preview
* Image streaming

See [`README.md`](README.md) for more details on the limitations of this implementation.
See [`README.md`](README.md) for more details on the limitations of this implementation.
Original file line number Diff line number Diff line change
Expand Up @@ -716,7 +716,7 @@ class CameraController extends ValueNotifier<CameraValue> {
Future<double> getMinExposureOffset() async {
_throwIfNotInitialized('getMinExposureOffset');
try {
return CameraPlatform.instance.getMinExposureOffset(_cameraId);
return await CameraPlatform.instance.getMinExposureOffset(_cameraId);
} on PlatformException catch (e) {
throw CameraException(e.code, e.message);
}
Expand All @@ -726,7 +726,7 @@ class CameraController extends ValueNotifier<CameraValue> {
Future<double> getMaxExposureOffset() async {
_throwIfNotInitialized('getMaxExposureOffset');
try {
return CameraPlatform.instance.getMaxExposureOffset(_cameraId);
return await CameraPlatform.instance.getMaxExposureOffset(_cameraId);
} on PlatformException catch (e) {
throw CameraException(e.code, e.message);
}
Expand All @@ -738,7 +738,7 @@ class CameraController extends ValueNotifier<CameraValue> {
Future<double> getExposureOffsetStepSize() async {
_throwIfNotInitialized('getExposureOffsetStepSize');
try {
return CameraPlatform.instance.getExposureOffsetStepSize(_cameraId);
return await CameraPlatform.instance.getExposureOffsetStepSize(_cameraId);
} on PlatformException catch (e) {
throw CameraException(e.code, e.message);
}
Expand Down Expand Up @@ -783,7 +783,7 @@ class CameraController extends ValueNotifier<CameraValue> {
}

try {
return CameraPlatform.instance.setExposureOffset(_cameraId, offset);
return await CameraPlatform.instance.setExposureOffset(_cameraId, offset);
} on PlatformException catch (e) {
throw CameraException(e.code, e.message);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -898,7 +898,7 @@ class _CameraExampleHomeState extends State<CameraExampleHome>
}

try {
return cameraController.stopVideoRecording();
return await cameraController.stopVideoRecording();
} on CameraException catch (e) {
_showCameraException(e);
return null;
Expand Down
2 changes: 1 addition & 1 deletion packages/camera/camera_android_camerax/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: camera_android_camerax
description: Android implementation of the camera plugin using the CameraX library.
repository: https://github.com/flutter/packages/tree/main/packages/camera/camera_android_camerax
issue_tracker: https://github.com/flutter/flutter/issues?q=is%3Aissue+is%3Aopen+label%3A%22p%3A+camera%22
version: 0.6.30
version: 0.6.30+1

environment:
sdk: ^3.9.0
Expand Down
4 changes: 4 additions & 0 deletions packages/camera/camera_avfoundation/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
## 0.9.23+3

* Updates example to demonstrate correct exception handling for async return statements, ensuring exceptions thrown during return are properly caught as per [dart-lang/sdk#44395](https://github.com/dart-lang/sdk/issues/44395).

## 0.9.23+2

* Code refactor related to Swift pigeon's generated struct MediaSettings being immutable.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -903,7 +903,7 @@ class _CameraExampleHomeState extends State<CameraExampleHome>
}

try {
return cameraController.stopVideoRecording();
return await cameraController.stopVideoRecording();
} on CameraException catch (e) {
_showCameraException(e);
return null;
Expand Down
2 changes: 1 addition & 1 deletion packages/camera/camera_avfoundation/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: camera_avfoundation
description: iOS implementation of the camera plugin.
repository: https://github.com/flutter/packages/tree/main/packages/camera/camera_avfoundation
issue_tracker: https://github.com/flutter/flutter/issues?q=is%3Aissue+is%3Aopen+label%3A%22p%3A+camera%22
version: 0.9.23+2
version: 0.9.23+3

environment:
sdk: ^3.9.0
Expand Down
6 changes: 5 additions & 1 deletion packages/google_fonts/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
## 8.0.2

- Fixes a bug where exceptions thrown during a return statement in an async function were not correctly caught, aligning behavior with expected Dart semantics (see [dart-lang/sdk#44395](https://github.com/dart-lang/sdk/issues/44395)).

## 8.0.1

- Fixes WOFF2/WOFF font selection when loading fonts bundled with the app to prefer compressed formats regardless of asset manifest order.
Expand Down Expand Up @@ -1002,4 +1006,4 @@

- Initial release: supports all 960 fonts and variants from fonts.google.com
- ttf files are downloaded via http on demand, and saved to local disk so that they can be loaded without making another http request for future font requests
- Fonts are loaded asynchronously through the font loader and Text widgets that use them are refreshed when they are ready
- Fonts are loaded asynchronously through the font loader and Text widgets that use them are refreshed when they are ready
6 changes: 3 additions & 3 deletions packages/google_fonts/lib/src/google_fonts_base.dart
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ Future<void> loadFontIfNecessary(GoogleFontsDescriptor descriptor) async {
byteData = rootBundle.load(assetPath);
}
if (await byteData != null) {
return loadFontByteData(familyWithVariantString, byteData);
return await loadFontByteData(familyWithVariantString, byteData);
}

// Check if this font can be loaded from the device file system.
Expand All @@ -161,7 +161,7 @@ Future<void> loadFontIfNecessary(GoogleFontsDescriptor descriptor) async {
);

if (await byteData != null) {
return loadFontByteData(familyWithVariantString, byteData);
return await loadFontByteData(familyWithVariantString, byteData);
}

// Attempt to load this font via http, unless disallowed.
Expand All @@ -171,7 +171,7 @@ Future<void> loadFontIfNecessary(GoogleFontsDescriptor descriptor) async {
descriptor.file,
);
if (await byteData != null) {
return loadFontByteData(familyWithVariantString, byteData);
return await loadFontByteData(familyWithVariantString, byteData);
}
} else {
throw Exception(
Expand Down
2 changes: 1 addition & 1 deletion packages/google_fonts/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: google_fonts
description: A Flutter package to use fonts from fonts.google.com. Supports HTTP fetching, caching, and asset bundling.
repository: https://github.com/flutter/packages/tree/main/packages/google_fonts
issue_tracker: https://github.com/flutter/flutter/issues?q=is%3Aissue+is%3Aopen+label%3A%22p%3A+google_fonts%22
version: 8.0.1
version: 8.0.2

environment:
sdk: ^3.9.0
Expand Down