Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
39 commits
Select commit Hold shift + click to select a range
ad9ed35
[ios_platform_images] migrate objC to swift
Mairramer Sep 5, 2023
e5545bc
pump version
Mairramer Sep 5, 2023
cf21182
added some tests
Mairramer Sep 6, 2023
008d5d3
update tests
Mairramer Sep 8, 2023
e422e78
Merge branch 'main' into ios_platform_images_swift_migration
Mairramer Sep 8, 2023
b0122cf
fix format
Mairramer Sep 8, 2023
54b9b92
Merge branch 'main' into ios_platform_images_swift_migration
Mairramer Sep 9, 2023
6c29139
Merge branch 'main' into ios_platform_images_swift_migration
Mairramer Sep 10, 2023
f3ce031
improve code
Mairramer Sep 11, 2023
100202a
rollback comment
Mairramer Sep 11, 2023
97dc083
pump version
Mairramer Sep 11, 2023
1a28d20
Merge branch 'main' into ios_platform_images_swift_migration
Mairramer Sep 13, 2023
8da12bd
rollback implementation
Mairramer Sep 13, 2023
50ce448
rollback original logic
Mairramer Sep 14, 2023
59d7b6d
fix logic
Mairramer Sep 14, 2023
17a369e
rollback logic
Mairramer Sep 14, 2023
cfbf55f
Merge branch 'main' into ios_platform_images_swift_migration
Mairramer Sep 14, 2023
101c190
fix test
Mairramer Sep 14, 2023
1d2969b
fix test
Mairramer Sep 14, 2023
372ce11
fix scaled image and migrate tests
Mairramer Oct 13, 2023
523a277
Merge remote-tracking branch 'origin/main' into ios_platform_images_s…
Mairramer Oct 13, 2023
aef7985
migrate pigeon to swift
Mairramer Oct 13, 2023
78cbc82
format code
Mairramer Oct 13, 2023
45d185d
fix build script
Mairramer Oct 13, 2023
a9a4879
improves
Mairramer Oct 13, 2023
364be83
update readme
Mairramer Oct 13, 2023
aae7a29
rollback objC test
Mairramer Oct 17, 2023
cbbc208
fix test import
Mairramer Oct 17, 2023
ac54592
improves
Mairramer Oct 17, 2023
3e66718
improve test
Mairramer Oct 17, 2023
71f2589
fix test
Mairramer Oct 17, 2023
e2d9a9a
Merge branch 'main' into ios_platform_images_swift_migration
Mairramer Oct 17, 2023
3324ccd
rollback
Mairramer Oct 17, 2023
e370d61
update readme
Mairramer Oct 17, 2023
b25d574
Revert whitespace change in podfile
stuartmorgan-g Oct 20, 2023
5d03976
TODO style fix
stuartmorgan-g Oct 20, 2023
eaf7c90
Re-add DEFINES_MODULE
stuartmorgan-g Oct 20, 2023
139e125
Merge branch 'main' into ios_platform_images_swift_migration
stuartmorgan-g Oct 20, 2023
6ea1fc0
Merge branch 'main' into ios_platform_images_swift_migration
Mairramer Oct 20, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
Prev Previous commit
Next Next commit
Merge remote-tracking branch 'origin/main' into ios_platform_images_s…
…wift_migration

# Conflicts:
#	packages/ios_platform_images/CHANGELOG.md
#	packages/ios_platform_images/example/ios/Runner.xcodeproj/project.pbxproj
#	packages/ios_platform_images/ios/Classes/IosPlatformImagesPlugin.h
#	packages/ios_platform_images/ios/Classes/IosPlatformImagesPlugin.m
#	packages/ios_platform_images/pubspec.yaml
#	packages/ios_platform_images/test/ios_platform_images_test.dart
  • Loading branch information
Mairramer committed Oct 13, 2023
commit 523a27722f4679a3dc6817806fbb4bdde7f829c4
60 changes: 58 additions & 2 deletions .ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ platform_properties:
[
{"dependency": "gems", "version": "v3.3.14"}
]
os: Mac-12
os: "Mac-12|Mac-13"
device_type: none
cpu: arm64
$flutter/osx_sdk : >-
Expand All @@ -77,7 +77,7 @@ platform_properties:
[
{"dependency": "gems", "version": "v3.3.14"}
]
os: Mac-12
os: "Mac-12|Mac-13"
device_type: none
cpu: x86
$flutter/osx_sdk : >-
Expand Down Expand Up @@ -380,6 +380,34 @@ targets:
{"dependency": "android_virtual_device", "version": "33"}
]

- name: Linux_android android_platform_tests_api_33_shard_1 master
recipe: packages/packages
timeout: 60
bringup: true
properties:
target_file: android_platform_tests_api_33.yaml
channel: master
version_file: flutter_master.version
package_sharding: "--shardIndex 0 --shardCount 2"
dependencies: >-
[
{"dependency": "android_virtual_device", "version": "33"}
]

- name: Linux_android android_platform_tests_api_33_shard_2 master
recipe: packages/packages
timeout: 60
bringup: true
properties:
target_file: android_platform_tests_api_33.yaml
channel: master
version_file: flutter_master.version
package_sharding: "--shardIndex 1 --shardCount 2"
dependencies: >-
[
{"dependency": "android_virtual_device", "version": "33"}
]

- name: Linux_android android_platform_tests_shard_1 stable
recipe: packages/packages
presubmit: false
Expand Down Expand Up @@ -464,6 +492,34 @@ targets:
{"dependency": "android_virtual_device", "version": "33"}
]

- name: Linux_android android_platform_tests_api_33_shard_1 stable
recipe: packages/packages
timeout: 60
bringup: true
properties:
target_file: android_platform_tests_api_33.yaml
channel: master
version_file: flutter_stable.version
package_sharding: "--shardIndex 0 --shardCount 2"
dependencies: >-
[
{"dependency": "android_virtual_device", "version": "33"}
]

- name: Linux_android android_platform_tests_api_33_shard_2 stable
recipe: packages/packages
timeout: 60
bringup: true
properties:
target_file: android_platform_tests_api_33.yaml
channel: master
version_file: flutter_stable.version
package_sharding: "--shardIndex 1 --shardCount 2"
dependencies: >-
[
{"dependency": "android_virtual_device", "version": "33"}
]

# Device versions of Android integration tests, run via FTL.
# TODO(stuartmorgan): Revisit whether physical device tests are redundant once
# we have more data about emulator tests; see
Expand Down
2 changes: 1 addition & 1 deletion .ci/flutter_master.version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
61b890bfcbc106bc011007c6ac6fd42ec87c9818
83134ac7e44c9c9a9637955de23abecc304b492e
2 changes: 1 addition & 1 deletion .ci/flutter_stable.version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
2524052335ec76bb03e04ede244b071f1b86d190
ead455963c12b453cdb2358cad34969c76daf180
14 changes: 14 additions & 0 deletions .ci/scripts/boot_simulator.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
#!/bin/bash
# Copyright 2013 The Flutter Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
set -e

# The name here must match create_simulator.sh
readonly DEVICE_NAME=Flutter-iPhone

# Allow boot to fail; cases like "Unable to boot device in current state: Booted"
# exit with failure.
xcrun simctl boot "$DEVICE_NAME" || :
echo -e ""
xcrun simctl list
15 changes: 14 additions & 1 deletion .ci/scripts/create_simulator.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,18 @@ readonly DEVICE_NAME=Flutter-iPhone
readonly DEVICE=com.apple.CoreSimulator.SimDeviceType.iPhone-14
readonly OS=com.apple.CoreSimulator.SimRuntime.iOS-16-4

xcrun simctl list
# Delete any existing devices named Flutter-iPhone. Having more than one may
# cause issues when builds target the device.
echo -e "Deleting any existing devices names $DEVICE_NAME..."
RESULT=0
while [[ $RESULT == 0 ]]; do
xcrun simctl delete "$DEVICE_NAME" || RESULT=1
if [ $RESULT == 0 ]; then
echo -e "Deleted $DEVICE_NAME"
fi
done
echo -e ""

echo -e "\nCreating $DEVICE_NAME $DEVICE $OS ...\n"
xcrun simctl create "$DEVICE_NAME" "$DEVICE" "$OS" | xargs xcrun simctl boot
xcrun simctl list
30 changes: 30 additions & 0 deletions .ci/targets/android_platform_tests_api_33_avd.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
# Same as android_platform_tests.yaml with only packages currently requiring
# Android 33 due to test failures caused by running on Android 34 AVDs.
tasks:
- name: prepare tool
script: .ci/scripts/prepare_tool.sh
infra_step: true # Note infra steps failing prevents "always" from running.
- name: download Dart and Android deps
script: script/tool_runner.sh
infra_step: true
args: ["fetch-deps", "--android", "--supporting-target-platforms-only", "--filter-packages-to=script/configs/still_requires_api_33_avd.yaml"]
- name: build examples
script: script/tool_runner.sh
args: ["build-examples", "--apk", "--filter-packages-to=script/configs/still_requires_api_33_avd.yaml"]
- name: lint
script: script/tool_runner.sh
args: ["lint-android", "--filter-packages-to=script/configs/still_requires_api_33_avd.yaml"]
# Native unit and native integration are split into two steps to allow for
# different exclusions.
# TODO(stuartmorgan): Eliminate the native unit test exclusion, and combine
# these steps.
- name: native unit tests
script: script/tool_runner.sh
args: ["native-test", "--android", "--no-integration", "--filter-packages-to=script/configs/still_requires_api_33_avd.yaml"]
- name: native integration tests
script: script/tool_runner.sh
args: ["native-test", "--android", "--no-unit", "--filter-packages-to=script/configs/still_requires_api_33_avd.yaml"]
- name: drive examples
script: script/tool_runner.sh
args: ["drive-examples", "--android", "--filter-packages-to=script/configs/still_requires_api_33_avd.yaml"]

7 changes: 6 additions & 1 deletion .ci/targets/ios_platform_tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,12 @@ tasks:
args: ["xcode-analyze", "--ios", "--ios-min-version=13.0"]
- name: native test
script: script/tool_runner.sh
args: ["native-test", "--ios", "--ios-destination", "platform=iOS Simulator,name=iPhone 14,OS=latest"]
# Simulator name must match name in create_simulator.sh
args: ["native-test", "--ios", "--ios-destination", "platform=iOS Simulator,name=Flutter-iPhone,OS=16.4"]
- name: boot simulator
# Ensure simulator is still booted
script: .ci/scripts/boot_simulator.sh
infra_step: true # Note infra steps failing prevents "always" from running.
- name: drive examples
# `drive-examples` contains integration tests, which changes the UI of the application.
# This UI change sometimes affects `xctest`.
Expand Down
11 changes: 11 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -537,6 +537,17 @@ updates:
- dependency-name: "org.robolectric:*"
update-types: ["version-update:semver-minor", "version-update:semver-patch"]

- package-ecosystem: "gradle"
directory: "/packages/platform/example/android/app"
commit-message:
prefix: "[platform]"
schedule:
interval: "weekly"
open-pull-requests-limit: 10
ignore:
- dependency-name: "*"
update-types: ["version-update:semver-minor", "version-update:semver-patch"]

- package-ecosystem: "gradle"
directory: "/packages/pigeon/platform_tests/test_plugin/android"
commit-message:
Expand Down
18 changes: 17 additions & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,13 +36,29 @@ jobs:
cd $GITHUB_WORKSPACE
# Checks out a copy of the repo.
- name: Check out code
uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac
uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608
with:
fetch-depth: 0 # Fetch all history so the tool can get all the tags to determine version.
- name: Set up tools
run: dart pub get
working-directory: ${{ github.workspace }}/script/tool

# The next step waits for all tests, but when there are issues with the
# hooks it can take a long time for the tests to even be registered. If
# "Wait on all tests" runs before that happens, it will pass immediately
# because there doesn't appear to be anything to wait for. To avoid that,
# explicitly wait for one LUCI test by name first.
- name: Wait for test check-in
uses: lewagon/wait-on-check-action@e106e5c43e8ca1edea6383a39a01c5ca495fd812
with:
ref: ${{ github.sha }}
check-name: 'Linux ci_yaml packages roller'
repo-token: ${{ secrets.GITHUB_TOKEN }}
wait-interval: 30 # seconds
allowed-conclusions: success,neutral
# verbose:true will produce too many logs that hang github actions web UI.
verbose: false

# This workflow should be the last to run. So wait for all the other tests to succeed.
- name: Wait on all tests
uses: lewagon/wait-on-check-action@e106e5c43e8ca1edea6383a39a01c5ca495fd812
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/scorecards-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,12 @@ jobs:

steps:
- name: "Checkout code"
uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac # v2.4.0
uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v2.4.0
with:
persist-credentials: false

- name: "Run analysis"
uses: ossf/scorecard-action@08b4669551908b1024bb425080c797723083c031 # v2.0.3
uses: ossf/scorecard-action@483ef80eb98fb506c348f7d62e28055e49fe2398 # v2.0.3
with:
results_file: results.sarif
results_format: sarif
Expand All @@ -49,6 +49,6 @@ jobs:

# Upload the results to GitHub's code scanning dashboard.
- name: "Upload to code-scanning"
uses: github/codeql-action/upload-sarif@00e563ead9f72a8461b24876bee2d0c2e8bd2ee8 # v1.0.26
uses: github/codeql-action/upload-sarif@fdcae64e1484d349b3366718cdfef3d404390e85 # v1.0.26
with:
sarif_file: results.sarif
1 change: 1 addition & 0 deletions CODEOWNERS
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ packages/pigeon/** @tarrinneal
packages/platform/** @stuartmorgan
packages/plugin_platform_interface/** @stuartmorgan
packages/pointer_interceptor/** @ditman
packages/process/** @stuartmorgan
packages/quick_actions/** @bparrishMines
packages/rfw/** @Hixie
packages/shared_preferences/** @tarrinneal
Expand Down
5 changes: 3 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Flutter Packages

[![Build Status](https://api.cirrus-ci.com/github/flutter/packages.svg)](https://cirrus-ci.com/github/flutter/packages/main)
[![Release Status](https://github.com/flutter/packages/actions/workflows/release.yml/badge.svg)](https://github.com/flutter/packages/actions/workflows/release.yml)
[![Build Dashboard](https://img.shields.io/badge/Build_Dashboard-60C9F8)](https://flutter-dashboard.appspot.com/#/build?repo=packages)
[![OpenSSF Scorecard](https://api.securityscorecards.dev/projects/github.com/flutter/packages/badge)](https://deps.dev/project/github/flutter%2Fpackages)

This repo is a companion repo to the main [flutter repo](
Expand All @@ -14,7 +14,7 @@ These packages are also available on [pub](https://pub.dartlang.org/flutter/pack
## Issues

Please file any issues, bugs, or feature requests in the [main flutter
repo](https://github.com/flutter/flutter/issues/new).
repo](https://github.com/flutter/flutter/issues/new/choose).
Issues pertaining to this repository are [labeled
"package"](https://github.com/flutter/flutter/issues?q=is%3Aopen+is%3Aissue+label%3Apackage).

Expand Down Expand Up @@ -67,6 +67,7 @@ These are the packages hosted in this repository:
| [platform](./packages/platform/) | [![pub package](https://img.shields.io/pub/v/platform.svg)](https://pub.dev/packages/platform) | [![pub points](https://img.shields.io/pub/points/platform)](https://pub.dev/packages/platform/score) | [![popularity](https://img.shields.io/pub/popularity/platform)](https://pub.dev/packages/platform/score) | [![GitHub issues by-label](https://img.shields.io/github/issues/flutter/flutter/p:%20platform?label=)](https://github.com/flutter/flutter/labels/p%3A%20platform) | [![GitHub pull requests by-label](https://img.shields.io/github/issues-pr/flutter/packages/p:%20platform?label=)](https://github.com/flutter/packages/labels/p%3A%20platform) |
| [pointer\_interceptor](./packages/pointer_interceptor/) | [![pub package](https://img.shields.io/pub/v/pointer_interceptor.svg)](https://pub.dev/packages/pointer_interceptor) | [![pub points](https://img.shields.io/pub/points/pointer_interceptor)](https://pub.dev/packages/pointer_interceptor/score) | [![popularity](https://img.shields.io/pub/popularity/pointer_interceptor)](https://pub.dev/packages/pointer_interceptor/score) | [![GitHub issues by-label](https://img.shields.io/github/issues/flutter/flutter/p:%20pointer_interceptor?label=)](https://github.com/flutter/flutter/labels/p%3A%20pointer_interceptor) | [![GitHub pull requests by-label](https://img.shields.io/github/issues-pr/flutter/packages/p:%20pointer_interceptor?label=)](https://github.com/flutter/packages/labels/p%3A%20pointer_interceptor) |
| [plugin\_platform\_interface](./packages/plugin_platform_interface/) | [![pub package](https://img.shields.io/pub/v/plugin_platform_interface.svg)](https://pub.dev/packages/plugin_platform_interface) | [![pub points](https://img.shields.io/pub/points/plugin_platform_interface)](https://pub.dev/packages/plugin_platform_interface/score) | [![popularity](https://img.shields.io/pub/popularity/plugin_platform_interface)](https://pub.dev/packages/plugin_platform_interface/score) | [![GitHub issues by-label](https://img.shields.io/github/issues/flutter/flutter/p:%20plugin_platform_interface?label=)](https://github.com/flutter/flutter/labels/p%3A%20plugin_platform_interface) | [![GitHub pull requests by-label](https://img.shields.io/github/issues-pr/flutter/packages/p:%20plugin_platform_interface?label=)](https://github.com/flutter/packages/labels/p%3A%20plugin_platform_interface) |
| [process](./packages/process/) | [![pub package](https://img.shields.io/pub/v/process.svg)](https://pub.dev/packages/process) | [![pub points](https://img.shields.io/pub/points/process)](https://pub.dev/packages/process/score) | [![popularity](https://img.shields.io/pub/popularity/process)](https://pub.dev/packages/process/score) | [![GitHub issues by-label](https://img.shields.io/github/issues/flutter/flutter/p:%20process?label=)](https://github.com/flutter/flutter/labels/p%3A%20process) | [![GitHub pull requests by-label](https://img.shields.io/github/issues-pr/flutter/packages/p:%20process?label=)](https://github.com/flutter/packages/labels/p%3A%20process) |
| [quick\_actions](./packages/quick_actions/) | [![pub package](https://img.shields.io/pub/v/quick_actions.svg)](https://pub.dev/packages/quick_actions) | [![pub points](https://img.shields.io/pub/points/quick_actions)](https://pub.dev/packages/quick_actions/score) | [![popularity](https://img.shields.io/pub/popularity/quick_actions)](https://pub.dev/packages/quick_actions/score) | [![GitHub issues by-label](https://img.shields.io/github/issues/flutter/flutter/p:%20quick_actions?label=)](https://github.com/flutter/flutter/labels/p%3A%20quick_actions) | [![GitHub pull requests by-label](https://img.shields.io/github/issues-pr/flutter/packages/p:%20quick_actions?label=)](https://github.com/flutter/packages/labels/p%3A%20quick_actions) |
| [rfw](./packages/rfw/) | [![pub package](https://img.shields.io/pub/v/rfw.svg)](https://pub.dev/packages/rfw) | [![pub points](https://img.shields.io/pub/points/rfw)](https://pub.dev/packages/rfw/score) | [![popularity](https://img.shields.io/pub/popularity/rfw)](https://pub.dev/packages/rfw/score) | [![GitHub issues by-label](https://img.shields.io/github/issues/flutter/flutter/p:%20rfw?label=)](https://github.com/flutter/flutter/labels/p%3A%20rfw) | [![GitHub pull requests by-label](https://img.shields.io/github/issues-pr/flutter/packages/p:%20rfw?label=)](https://github.com/flutter/packages/labels/p%3A%20rfw) |
| [shared\_preferences](./packages/shared_preferences/) | [![pub package](https://img.shields.io/pub/v/shared_preferences.svg)](https://pub.dev/packages/shared_preferences) | [![pub points](https://img.shields.io/pub/points/shared_preferences)](https://pub.dev/packages/shared_preferences/score) | [![popularity](https://img.shields.io/pub/popularity/shared_preferences)](https://pub.dev/packages/shared_preferences/score) | [![GitHub issues by-label](https://img.shields.io/github/issues/flutter/flutter/p:%20shared_preferences?label=)](https://github.com/flutter/flutter/labels/p%3A%20shared_preferences) | [![GitHub pull requests by-label](https://img.shields.io/github/issues-pr/flutter/packages/p:%20shared_preferences?label=)](https://github.com/flutter/packages/labels/p%3A%20shared_preferences) |
Expand Down
6 changes: 6 additions & 0 deletions packages/camera/camera/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
## 0.10.5+5

* Fixes bug where old camera resources were not disposed when switching between camera descriptions.
* Fixes bug where _deviceOrientationSubscription was recreated every time the camera description was
changed.

## 0.10.5+4

* Adds pub topics to package metadata.
Expand Down
24 changes: 18 additions & 6 deletions packages/camera/camera/lib/src/camera_controller.dart
Original file line number Diff line number Diff line change
Expand Up @@ -265,7 +265,10 @@ class CameraController extends ValueNotifier<CameraValue> {

bool _isDisposed = false;
StreamSubscription<CameraImageData>? _imageStreamSubscription;
FutureOr<bool>? _initCalled;
// A Future awaiting an attempt to initialize (e.g. after `initialize` was
// just called). If the controller has not been initialized at least once,
// this value is null.
Future<void>? _initializeFuture;
StreamSubscription<DeviceOrientationChangedEvent>?
_deviceOrientationSubscription;

Expand Down Expand Up @@ -294,11 +297,15 @@ class CameraController extends ValueNotifier<CameraValue> {
'initialize was called on a disposed CameraController',
);
}

final Completer<void> initializeCompleter = Completer<void>();
_initializeFuture = initializeCompleter.future;

try {
final Completer<CameraInitializedEvent> initializeCompleter =
Completer<CameraInitializedEvent>();

_deviceOrientationSubscription = CameraPlatform.instance
_deviceOrientationSubscription ??= CameraPlatform.instance
.onDeviceOrientationChanged()
.listen((DeviceOrientationChangedEvent event) {
value = value.copyWith(
Expand Down Expand Up @@ -343,9 +350,9 @@ class CameraController extends ValueNotifier<CameraValue> {
);
} on PlatformException catch (e) {
throw CameraException(e.code, e.message);
} finally {
initializeCompleter.complete();
}

_initCalled = true;
}

/// Prepare the capture session for video recording.
Expand Down Expand Up @@ -402,6 +409,11 @@ class CameraController extends ValueNotifier<CameraValue> {
await CameraPlatform.instance.setDescriptionWhileRecording(description);
value = value.copyWith(description: description);
} else {
if (_initializeFuture != null) {
await _initializeFuture;
await CameraPlatform.instance.dispose(_cameraId);
}

await _initializeWithDescription(description);
}
}
Expand Down Expand Up @@ -841,8 +853,8 @@ class CameraController extends ValueNotifier<CameraValue> {
_unawaited(_deviceOrientationSubscription?.cancel());
_isDisposed = true;
super.dispose();
if (_initCalled != null) {
await _initCalled;
if (_initializeFuture != null) {
await _initializeFuture;
await CameraPlatform.instance.dispose(_cameraId);
}
}
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.10.5+4
version: 0.10.5+5

environment:
sdk: ">=2.19.0 <4.0.0"
Expand Down
Loading
You are viewing a condensed version of this merge commit. You can view the full changes here.