mirror of
https://github.com/flutter/packages.git
synced 2025-06-26 03:03:23 +08:00
[various] Remove all traces of the _ambiguate
workaround (#6449)
It's no longer needed - for now. Fixes https://github.com/flutter/flutter/issues/111841.
This commit is contained in:

committed by
GitHub

parent
d1a3d99893
commit
f4790cfd02
@ -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.
|
||||
|
@ -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),
|
||||
@ -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();
|
||||
@ -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');
|
||||
@ -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;
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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') {
|
||||
@ -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;
|
||||
}
|
||||
|
@ -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
|
||||
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
@ -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;
|
||||
|
@ -1,3 +1,7 @@
|
||||
## 2.8.4
|
||||
|
||||
* Removes `_ambiguate` methods from code.
|
||||
|
||||
## 2.8.3
|
||||
|
||||
* Fixes typo in `README.md`.
|
||||
|
@ -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
|
||||
@ -785,7 +785,7 @@ class _VideoAppLifeCycleObserver extends Object with WidgetsBindingObserver {
|
||||
}
|
||||
|
||||
void dispose() {
|
||||
_ambiguate(WidgetsBinding.instance)!.removeObserver(this);
|
||||
WidgetsBinding.instance.removeObserver(this);
|
||||
}
|
||||
}
|
||||
|
||||
@ -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;
|
||||
|
@ -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"
|
||||
|
@ -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);
|
||||
}
|
||||
@ -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;
|
||||
|
Reference in New Issue
Block a user