Skip to content
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
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.14+2

* Removes `_ambiguate` methods from example code.

## 0.9.14+1

* Fixes bug where max resolution preset does not produce highest available resolution on iOS.
Expand Down
12 changes: 3 additions & 9 deletions packages/camera/camera_avfoundation/example/lib/main.dart
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ class _CameraExampleHomeState extends State<CameraExampleHome>
@override
void initState() {
super.initState();
_ambiguate(WidgetsBinding.instance)?.addObserver(this);
WidgetsBinding.instance.addObserver(this);

_flashModeControlRowAnimationController = AnimationController(
duration: const Duration(milliseconds: 300),
Expand Down Expand Up @@ -105,7 +105,7 @@ class _CameraExampleHomeState extends State<CameraExampleHome>

@override
void dispose() {
_ambiguate(WidgetsBinding.instance)?.removeObserver(this);
WidgetsBinding.instance.removeObserver(this);
_flashModeControlRowAnimationController.dispose();
_exposureModeControlRowAnimationController.dispose();
super.dispose();
Expand Down Expand Up @@ -580,7 +580,7 @@ class _CameraExampleHomeState extends State<CameraExampleHome>
}

if (_cameras.isEmpty) {
_ambiguate(SchedulerBinding.instance)?.addPostFrameCallback((_) async {
SchedulerBinding.instance.addPostFrameCallback((_) async {
showInSnackBar('No camera found.');
});
return const Text('None');
Expand Down Expand Up @@ -1064,9 +1064,3 @@ Future<void> main() async {
}
runApp(const CameraApp());
}

/// 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.
T? _ambiguate<T>(T? value) => value;
2 changes: 1 addition & 1 deletion packages/camera/camera_avfoundation/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ 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.14+1
version: 0.9.14+2

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

* Removes `_ambiguate` methods from code.

## 0.6.22

* Introduces a new `MarkdownElementBuilder.isBlockElement()` method to specify if custom element
Expand Down
8 changes: 1 addition & 7 deletions packages/flutter_markdown/lib/src/builder.dart
Original file line number Diff line number Diff line change
Expand Up @@ -518,7 +518,7 @@ class MarkdownBuilder implements md.NodeVisitor {
_mergeInlineChildren(current.children, align),
textAlign: align,
);
_ambiguate(_tables.single.rows.last.children)!.add(child);
_tables.single.rows.last.children.add(child);
} else if (tag == 'a') {
_linkHandlers.removeLast();
} else if (tag == 'sup') {
Expand Down Expand Up @@ -967,10 +967,4 @@ class MarkdownBuilder implements md.NodeVisitor {
);
}
}

/// 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.
T? _ambiguate<T>(T? value) => value;
}
2 changes: 1 addition & 1 deletion packages/flutter_markdown/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ description: A Markdown renderer for Flutter. Create rich text output,
formatted with simple Markdown tags.
repository: https://github.com/flutter/packages/tree/main/packages/flutter_markdown
issue_tracker: https://github.com/flutter/flutter/issues?q=is%3Aissue+is%3Aopen+label%3A%22p%3A+flutter_markdown%22
version: 0.6.22
version: 0.6.22+1

environment:
sdk: ^3.3.0
Expand Down
8 changes: 1 addition & 7 deletions packages/flutter_markdown/test/utils.dart
Original file line number Diff line number Diff line change
Expand Up @@ -204,7 +204,7 @@ void expectTableSize(int rows, int columns) {

expect(table.children.length, rows);
for (int index = 0; index < rows; index++) {
expect(_ambiguate(table.children[index].children)!.length, columns);
expect(table.children[index].children.length, columns);
}
}

Expand Down Expand Up @@ -263,9 +263,3 @@ class TestAssetBundle extends CachingAssetBundle {
}
}
}

/// 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.
T? _ambiguate<T>(T? value) => value;
4 changes: 4 additions & 0 deletions packages/video_player/video_player/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
## 2.8.4

* Removes `_ambiguate` methods from code.

## 2.8.3

* Fixes typo in `README.md`.
Expand Down
10 changes: 2 additions & 8 deletions packages/video_player/video_player/lib/video_player.dart
Original file line number Diff line number Diff line change
Expand Up @@ -769,7 +769,7 @@ class _VideoAppLifeCycleObserver extends Object with WidgetsBindingObserver {
final VideoPlayerController _controller;

void initialize() {
_ambiguate(WidgetsBinding.instance)!.addObserver(this);
WidgetsBinding.instance.addObserver(this);
}

@override
Expand All @@ -785,7 +785,7 @@ class _VideoAppLifeCycleObserver extends Object with WidgetsBindingObserver {
}

void dispose() {
_ambiguate(WidgetsBinding.instance)!.removeObserver(this);
WidgetsBinding.instance.removeObserver(this);
}
}

Expand Down Expand Up @@ -1170,9 +1170,3 @@ class ClosedCaption extends StatelessWidget {
);
}
}

/// 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.
T? _ambiguate<T>(T? value) => value;
2 changes: 1 addition & 1 deletion packages/video_player/video_player/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ description: Flutter plugin for displaying inline video with other Flutter
widgets on Android, iOS, and web.
repository: https://github.com/flutter/packages/tree/main/packages/video_player/video_player
issue_tracker: https://github.com/flutter/flutter/issues?q=is%3Aissue+is%3Aopen+label%3A%22p%3A+video_player%22
version: 2.8.3
version: 2.8.4

environment:
sdk: ">=3.1.0 <4.0.0"
Expand Down
10 changes: 2 additions & 8 deletions packages/video_player/video_player/test/video_player_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -121,10 +121,10 @@ void main() {
required bool shouldPlayInBackground,
}) {
expect(controller.value.isPlaying, true);
_ambiguate(WidgetsBinding.instance)!
WidgetsBinding.instance
.handleAppLifecycleStateChanged(AppLifecycleState.paused);
expect(controller.value.isPlaying, shouldPlayInBackground);
_ambiguate(WidgetsBinding.instance)!
WidgetsBinding.instance
.handleAppLifecycleStateChanged(AppLifecycleState.resumed);
expect(controller.value.isPlaying, true);
}
Expand Down Expand Up @@ -1393,9 +1393,3 @@ class FakeVideoPlayerPlatform extends VideoPlayerPlatform {
return Texture(textureId: textureId);
}
}

/// 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.
T? _ambiguate<T>(T? value) => value;