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

[various] Prepare plugin repo for binding API improvements #4148

Merged
merged 1 commit into from
Jul 9, 2021
Merged
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
5 changes: 5 additions & 0 deletions packages/camera/camera/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
## 0.8.1+4

* Silenced warnings that may occur during build when using a very
recent version of Flutter relating to null safety.

## 0.8.1+3

* Do not change camera orientation when iOS device is flat.
Expand Down
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 @@ -98,7 +98,7 @@ class _CameraExampleHomeState extends State<CameraExampleHome>

@override
void dispose() {
WidgetsBinding.instance?.removeObserver(this);
_ambiguate(WidgetsBinding.instance)?.removeObserver(this);
_flashModeControlRowAnimationController.dispose();
_exposureModeControlRowAnimationController.dispose();
super.dispose();
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 getting information about and controlling the
and streaming image buffers to dart.
repository: https://github.com/flutter/plugins/tree/master/packages/camera/camera
issue_tracker: https://github.com/flutter/flutter/issues?q=is%3Aissue+is%3Aopen+label%3A%22p%3A+camera%22
version: 0.8.1+3
version: 0.8.1+4

environment:
sdk: ">=2.12.0 <3.0.0"
Expand Down
13 changes: 11 additions & 2 deletions packages/video_player/video_player/test/video_player_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -856,7 +856,16 @@ class FakeEventsChannel {
}

void _sendMessage(ByteData data) {
ServicesBinding.instance!.defaultBinaryMessenger.handlePlatformMessage(
eventsMethodChannel.name, data, (ByteData? data) {});
_ambiguate(ServicesBinding.instance)!
.defaultBinaryMessenger
.handlePlatformMessage(
eventsMethodChannel.name, data, (ByteData? data) {});
}
}

/// This allows a value of type T or T? to be treated as a value of type T?.
///
/// We use this so that APIs that have become non-nullable can still be used
/// with `!` and `?` on the stable branch.
// TODO(ianh): Remove this once we roll stable in late 2021.
T? _ambiguate<T>(T? value) => value;