diff --git a/packages/video_player/video_player/example/integration_test/video_player_test.dart b/packages/video_player/video_player/example/integration_test/video_player_test.dart index 0acebb548c24..a431ece7bcf1 100644 --- a/packages/video_player/video_player/example/integration_test/video_player_test.dart +++ b/packages/video_player/video_player/example/integration_test/video_player_test.dart @@ -56,6 +56,15 @@ void main() { testWidgets( 'live stream duration != 0', (WidgetTester tester) async { + // This test requires network access, and won't pass until a LUCI recipe + // change is made. + // TODO(camsim99): Remove once https://github.com/flutter/flutter/issues/160797 is fixed. + if (!kIsWeb && Platform.isAndroid) { + markTestSkipped( + 'Skipping due to https://github.com/flutter/flutter/issues/160797'); + return; + } + final VideoPlayerController networkController = VideoPlayerController.networkUrl( Uri.parse( @@ -266,6 +275,15 @@ void main() { testWidgets( 'reports buffering status', (WidgetTester tester) async { + // This test requires network access, and won't pass until a LUCI recipe + // change is made. + // TODO(camsim99): Remove once https://github.com/flutter/flutter/issues/160797 is fixed. + if (!kIsWeb && Platform.isAndroid) { + markTestSkipped( + 'Skipping due to https://github.com/flutter/flutter/issues/160797'); + return; + } + await controller.initialize(); // Mute to allow playing without DOM interaction on Web. // See https://developers.google.com/web/updates/2017/09/autoplay-policy-changes diff --git a/script/tool/lib/src/common/package_looping_command.dart b/script/tool/lib/src/common/package_looping_command.dart index 9dc32279e929..b9c7a87c067b 100644 --- a/script/tool/lib/src/common/package_looping_command.dart +++ b/script/tool/lib/src/common/package_looping_command.dart @@ -340,7 +340,7 @@ abstract class PackageLoopingCommand extends PackageCommand { if (minFlutterVersion != null) { final Pubspec pubspec = package.parsePubspec(); final VersionConstraint? flutterConstraint = - pubspec.environment?['flutter']; + pubspec.environment['flutter']; if (flutterConstraint != null && !flutterConstraint.allows(minFlutterVersion)) { return PackageResult.skip( @@ -350,7 +350,7 @@ abstract class PackageLoopingCommand extends PackageCommand { if (minDartVersion != null) { final Pubspec pubspec = package.parsePubspec(); - final VersionConstraint? dartConstraint = pubspec.environment?['sdk']; + final VersionConstraint? dartConstraint = pubspec.environment['sdk']; if (dartConstraint != null && !dartConstraint.allows(minDartVersion)) { return PackageResult.skip('Does not support Dart $minDartVersion'); } diff --git a/script/tool/lib/src/create_all_packages_app_command.dart b/script/tool/lib/src/create_all_packages_app_command.dart index ab6b5637dd7b..812c32133b25 100644 --- a/script/tool/lib/src/create_all_packages_app_command.dart +++ b/script/tool/lib/src/create_all_packages_app_command.dart @@ -277,7 +277,7 @@ dependencies {} final Pubspec originalPubspec = app.parsePubspec(); const String dartSdkKey = 'sdk'; final VersionConstraint dartSdkConstraint = - originalPubspec.environment?[dartSdkKey] ?? + originalPubspec.environment[dartSdkKey] ?? VersionConstraint.compatibleWith( Version.parse('3.0.0'), ); @@ -342,7 +342,7 @@ publish_to: none version: ${pubspec.version} -environment:${_pubspecMapString(pubspec.environment!)} +environment:${_pubspecMapString(pubspec.environment)} dependencies:${_pubspecMapString(pubspec.dependencies)} diff --git a/script/tool/lib/src/pubspec_check_command.dart b/script/tool/lib/src/pubspec_check_command.dart index 66ac470d8235..d8fafb1b2b62 100644 --- a/script/tool/lib/src/pubspec_check_command.dart +++ b/script/tool/lib/src/pubspec_check_command.dart @@ -488,9 +488,9 @@ class PubspecCheckCommand extends PackageLoopingCommand { } final Version? dartConstraintMin = - _minimumForConstraint(pubspec.environment?['sdk']); + _minimumForConstraint(pubspec.environment['sdk']); final Version? flutterConstraintMin = - _minimumForConstraint(pubspec.environment?['flutter']); + _minimumForConstraint(pubspec.environment['flutter']); // Validate the Flutter constraint, if any. if (flutterConstraintMin != null && minMinFlutterVersion != null) { diff --git a/script/tool/lib/src/update_min_sdk_command.dart b/script/tool/lib/src/update_min_sdk_command.dart index 429036a47ef9..603886ce94ad 100644 --- a/script/tool/lib/src/update_min_sdk_command.dart +++ b/script/tool/lib/src/update_min_sdk_command.dart @@ -87,7 +87,7 @@ class UpdateMinSdkCommand extends PackageLoopingCommand { /// Returns the given "environment" section's [key] constraint as a range, /// if the key is present and has a range. VersionRange? _sdkRange(Pubspec pubspec, String key) { - final VersionConstraint? constraint = pubspec.environment?[key]; + final VersionConstraint? constraint = pubspec.environment[key]; if (constraint is VersionRange) { return constraint; } diff --git a/script/tool/pubspec.yaml b/script/tool/pubspec.yaml index d5ea5b934474..7bd5de4dde38 100644 --- a/script/tool/pubspec.yaml +++ b/script/tool/pubspec.yaml @@ -17,7 +17,7 @@ dependencies: path: ^1.8.3 platform: ^3.0.2 pub_semver: ^2.0.0 - pubspec_parse: ^1.2.2 + pubspec_parse: ^1.4.0 quiver: ^3.0.1 test: ^1.24.0 uuid: ^4.5.1 diff --git a/script/tool/test/create_all_packages_app_command_test.dart b/script/tool/test/create_all_packages_app_command_test.dart index bed615f12b6f..b65371a1971a 100644 --- a/script/tool/test/create_all_packages_app_command_test.dart +++ b/script/tool/test/create_all_packages_app_command_test.dart @@ -356,7 +356,7 @@ android { final Pubspec generatedPubspec = command.app.parsePubspec(); const String dartSdkKey = 'sdk'; - expect(generatedPubspec.environment?[dartSdkKey].toString(), + expect(generatedPubspec.environment[dartSdkKey].toString(), existingSdkConstraint); }); diff --git a/script/tool/test/update_min_sdk_command_test.dart b/script/tool/test/update_min_sdk_command_test.dart index 52d69ccb7bd0..d9bc93f23105 100644 --- a/script/tool/test/update_min_sdk_command_test.dart +++ b/script/tool/test/update_min_sdk_command_test.dart @@ -50,7 +50,7 @@ void main() { ]); final String dartVersion = - package.parsePubspec().environment?['sdk'].toString() ?? ''; + package.parsePubspec().environment['sdk'].toString(); expect(dartVersion, '^3.1.0'); }); @@ -65,7 +65,7 @@ void main() { ]); final String dartVersion = - package.parsePubspec().environment?['sdk'].toString() ?? ''; + package.parsePubspec().environment['sdk'].toString(); expect(dartVersion, '^3.1.0'); }); @@ -80,7 +80,7 @@ void main() { ]); final String dartVersion = - package.parsePubspec().environment?['sdk'].toString() ?? ''; + package.parsePubspec().environment['sdk'].toString(); expect(dartVersion, '^3.2.0'); }); @@ -98,9 +98,9 @@ void main() { ]); final String dartVersion = - package.parsePubspec().environment?['sdk'].toString() ?? ''; + package.parsePubspec().environment['sdk'].toString(); final String flutterVersion = - package.parsePubspec().environment?['flutter'].toString() ?? ''; + package.parsePubspec().environment['flutter'].toString(); expect(dartVersion, '^3.1.0'); expect(flutterVersion, '>=3.13.0'); }); @@ -119,9 +119,9 @@ void main() { ]); final String dartVersion = - package.parsePubspec().environment?['sdk'].toString() ?? ''; + package.parsePubspec().environment['sdk'].toString(); final String flutterVersion = - package.parsePubspec().environment?['flutter'].toString() ?? ''; + package.parsePubspec().environment['flutter'].toString(); expect(dartVersion, '^3.2.0'); expect(flutterVersion, '>=3.16.0'); });