[ci] Enable `strict-casts` (#3127)

* Enable strict-casts and fix violations

* Bump versions

* Fix Pigeon version bump
diff --git a/analysis_options.yaml b/analysis_options.yaml
index a3b0748..3dd7f08 100644
--- a/analysis_options.yaml
+++ b/analysis_options.yaml
@@ -7,7 +7,7 @@
 
 analyzer:
   language:
-    strict-casts: false # DIFFERENT FROM FLUTTER/FLUTTER, too many violations, TODO(goderbauer): Clean this up.
+    strict-casts: true
     strict-raw-types: true
   errors:
     # allow self-reference to deprecated members (we do this because otherwise we have
diff --git a/packages/cross_file/CHANGELOG.md b/packages/cross_file/CHANGELOG.md
index 21d9dde..a001f20 100644
--- a/packages/cross_file/CHANGELOG.md
+++ b/packages/cross_file/CHANGELOG.md
@@ -1,5 +1,6 @@
-## NEXT
+## 0.3.3+3
 
+* Updates code to fix strict-cast violations.
 * Updates minimum SDK version to Flutter 3.0.
 
 ## 0.3.3+2
diff --git a/packages/cross_file/lib/src/types/html.dart b/packages/cross_file/lib/src/types/html.dart
index 4659ebd..97ee166 100644
--- a/packages/cross_file/lib/src/types/html.dart
+++ b/packages/cross_file/lib/src/types/html.dart
@@ -142,7 +142,7 @@
       rethrow;
     }
 
-    _browserBlob = request.response;
+    _browserBlob = request.response as Blob?;
 
     assert(_browserBlob != null, 'The Blob backing this XFile cannot be null!');
 
diff --git a/packages/cross_file/pubspec.yaml b/packages/cross_file/pubspec.yaml
index 55e993d..099b914 100644
--- a/packages/cross_file/pubspec.yaml
+++ b/packages/cross_file/pubspec.yaml
@@ -2,7 +2,7 @@
 description: An abstraction to allow working with files across multiple platforms.
 repository: https://github.com/flutter/packages/tree/main/packages/cross_file
 issue_tracker: https://github.com/flutter/flutter/issues?q=is%3Aissue+is%3Aopen+label%3A%22p%3A+cross_file%22
-version: 0.3.3+2
+version: 0.3.3+3
 
 environment:
   sdk: ">=2.17.0 <3.0.0"
diff --git a/packages/cross_file/test/x_file_html_test.dart b/packages/cross_file/test/x_file_html_test.dart
index 593f5b2..a19e509 100644
--- a/packages/cross_file/test/x_file_html_test.dart
+++ b/packages/cross_file/test/x_file_html_test.dart
@@ -63,7 +63,7 @@
 
     test('Stores data as a Blob', () async {
       // Read the blob from its path 'natively'
-      final Object response = await html.window.fetch(file.path);
+      final Object response = await html.window.fetch(file.path) as Object;
       // Call '.arrayBuffer()' on the fetch response object to look at its bytes.
       final ByteBuffer data = await js_util.promiseToFuture(
         js_util.callMethod(response, 'arrayBuffer', <Object?>[]),
diff --git a/packages/flutter_image/test/network_test.dart b/packages/flutter_image/test/network_test.dart
index ecffd29..6711fb2 100644
--- a/packages/flutter_image/test/network_test.dart
+++ b/packages/flutter_image/test/network_test.dart
@@ -104,7 +104,7 @@
             Timer.run(onAttempt);
             return fakeAsync.run((FakeAsync fakeAsync) {
               return NetworkImageWithRetry.defaultFetchStrategy(uri, failure);
-            });
+            }) as Future<FetchInstructions>;
           },
         );
 
@@ -126,7 +126,7 @@
             Timer.run(onAttempt);
             return fakeAsync.run((FakeAsync fakeAsync) {
               return NetworkImageWithRetry.defaultFetchStrategy(uri, failure);
-            });
+            }) as Future<FetchInstructions>;
           },
         );
 
diff --git a/packages/flutter_markdown/test/image_test_mocks.dart b/packages/flutter_markdown/test/image_test_mocks.dart
index 3aab6e8..25c783e 100644
--- a/packages/flutter_markdown/test/image_test_mocks.dart
+++ b/packages/flutter_markdown/test/image_test_mocks.dart
@@ -43,11 +43,14 @@
   // Define an image stream that streams the mock test image for all
   // image tests that request an image.
   StreamSubscription<List<int>> imageStream(Invocation invocation) {
-    final void Function(List<int>)? onData = invocation.positionalArguments[0];
-    final void Function()? onDone = invocation.namedArguments[#onDone];
+    final void Function(List<int>)? onData =
+        invocation.positionalArguments[0] as Function(List<int>)?;
+    final void Function()? onDone =
+        invocation.namedArguments[#onDone] as Function()?;
     final void Function(Object, [StackTrace?])? onError =
-        invocation.namedArguments[#onError];
-    final bool? cancelOnError = invocation.namedArguments[#cancelOnError];
+        invocation.namedArguments[#onError] as Function(Object, [StackTrace?])?;
+    final bool? cancelOnError =
+        invocation.namedArguments[#cancelOnError] as bool?;
 
     return Stream<List<int>>.fromIterable(<List<int>>[transparentImage]).listen(
       onData,
@@ -345,16 +348,17 @@
   StreamSubscription<List<int>> listen(void Function(List<int> event)? onData,
           {Function? onError, void Function()? onDone, bool? cancelOnError}) =>
       super.noSuchMethod(
-          Invocation.method(
-            #listen,
-            <Object?>[onData],
-            <Symbol, Object?>{
-              #onError: onError,
-              #onDone: onDone,
-              #cancelOnError: cancelOnError
-            },
-          ),
-          returnValue: _FakeStreamSubscription<List<int>>());
+              Invocation.method(
+                #listen,
+                <Object?>[onData],
+                <Symbol, Object?>{
+                  #onError: onError,
+                  #onDone: onDone,
+                  #cancelOnError: cancelOnError
+                },
+              ),
+              returnValue: _FakeStreamSubscription<List<int>>())
+          as StreamSubscription<List<int>>;
 
   @override
   int get statusCode =>
diff --git a/packages/flutter_migrate/CHANGELOG.md b/packages/flutter_migrate/CHANGELOG.md
index 59f8a73..e6a465c 100644
--- a/packages/flutter_migrate/CHANGELOG.md
+++ b/packages/flutter_migrate/CHANGELOG.md
@@ -1,3 +1,7 @@
+## 0.0.1+1
+
+* Updates code to fix strict-cast violations.
+
 ## 0.0.1
 
 * Initial version.
diff --git a/packages/flutter_migrate/lib/src/environment.dart b/packages/flutter_migrate/lib/src/environment.dart
index 942c491..b3b2559 100644
--- a/packages/flutter_migrate/lib/src/environment.dart
+++ b/packages/flutter_migrate/lib/src/environment.dart
@@ -46,7 +46,8 @@
     // minimally validate basic JSON format and trim away any accidental logging before.
     if (commandOutput.contains(RegExp(r'[\s\S]*{[\s\S]+}[\s\S]*'))) {
       commandOutput = commandOutput.substring(commandOutput.indexOf('{'));
-      mapping = jsonDecode(commandOutput.replaceAll(r'\', r'\\'));
+      mapping = jsonDecode(commandOutput.replaceAll(r'\', r'\\'))
+          as Map<String, Object?>;
     }
     return FlutterToolsEnvironment(mapping: mapping);
   }
diff --git a/packages/flutter_migrate/lib/src/utils.dart b/packages/flutter_migrate/lib/src/utils.dart
index 6b46d73..84f70aa 100644
--- a/packages/flutter_migrate/lib/src/utils.dart
+++ b/packages/flutter_migrate/lib/src/utils.dart
@@ -59,7 +59,7 @@
         commandDescription: 'git ${cmdArgs.join(' ')}');
     return DiffResult(
         diffType: DiffType.command,
-        diff: result.stdout,
+        diff: result.stdout as String,
         exitCode: result.exitCode);
   }
 
@@ -129,7 +129,7 @@
     }
     final ProcessResult result =
         await _runCommand(cmdArgs, workingDirectory: outputDirectory);
-    final String error = result.stderr;
+    final String error = result.stderr as String;
 
     // Catch errors due to parameters not existing.
 
@@ -305,9 +305,9 @@
         _logger.printError(commandDescription, indent: 2);
       }
       _logger.printError('Stdout:');
-      _logger.printError(result.stdout, indent: 2);
+      _logger.printError(result.stdout as String, indent: 2);
       _logger.printError('Stderr:');
-      _logger.printError(result.stderr, indent: 2);
+      _logger.printError(result.stderr as String, indent: 2);
     }
     if (exit) {
       throwToolExit(
@@ -428,7 +428,7 @@
 class StringMergeResult extends MergeResult {
   /// Initializes a BinaryMergeResult based off of a ProcessResult.
   StringMergeResult(super.result, super.localPath)
-      : mergedString = result.stdout;
+      : mergedString = result.stdout as String;
 
   /// Manually initializes a StringMergeResult with explicit values.
   StringMergeResult.explicit({
diff --git a/packages/flutter_migrate/pubspec.yaml b/packages/flutter_migrate/pubspec.yaml
index 0cc819b..a1f06cb 100644
--- a/packages/flutter_migrate/pubspec.yaml
+++ b/packages/flutter_migrate/pubspec.yaml
@@ -1,6 +1,6 @@
 name: flutter_migrate
 description: A tool to migrate legacy flutter projects to modern versions.
-version: 0.0.1
+version: 0.0.1+1
 repository: https://github.com/flutter/packages/tree/main/packages/flutter_migrate
 issue_tracker: https://github.com/flutter/flutter/issues?q=is%3Aissue+is%3Aopen+label%3Ap%3A%20flutter_migrate
 publish_to: none
diff --git a/packages/flutter_migrate/test/migrate_test.dart b/packages/flutter_migrate/test/migrate_test.dart
index 0f4376a..10158ea 100644
--- a/packages/flutter_migrate/test/migrate_test.dart
+++ b/packages/flutter_migrate/test/migrate_test.dart
@@ -92,8 +92,8 @@
       '--verbose',
     ], workingDirectory: tempDir.path);
     logger.printStatus('${result.exitCode}', color: TerminalColor.blue);
-    logger.printStatus(result.stdout, color: TerminalColor.green);
-    logger.printStatus(result.stderr, color: TerminalColor.red);
+    logger.printStatus(result.stdout as String, color: TerminalColor.green);
+    logger.printStatus(result.stderr as String, color: TerminalColor.red);
     expect(result.exitCode, 0);
     expect(result.stdout.toString(), contains('Migration complete'));
 
@@ -151,8 +151,8 @@
       '--verbose',
     ], workingDirectory: tempDir.path);
     logger.printStatus('${result.exitCode}', color: TerminalColor.blue);
-    logger.printStatus(result.stdout, color: TerminalColor.green);
-    logger.printStatus(result.stderr, color: TerminalColor.red);
+    logger.printStatus(result.stdout as String, color: TerminalColor.green);
+    logger.printStatus(result.stderr as String, color: TerminalColor.red);
     expect(result.exitCode, 0);
     expect(result.stdout.toString(), contains('Migration complete'));
 
diff --git a/packages/flutter_migrate/test/update_locks_test.dart b/packages/flutter_migrate/test/update_locks_test.dart
index 5c17021..d04118f 100644
--- a/packages/flutter_migrate/test/update_locks_test.dart
+++ b/packages/flutter_migrate/test/update_locks_test.dart
@@ -79,8 +79,8 @@
 ''', flush: true);
     await updatePubspecDependencies(flutterProject, utils, logger, terminal,
         force: true);
-    final YamlMap pubspecYaml = loadYaml(pubspec.readAsStringSync());
-    final YamlMap dependenciesMap = pubspecYaml['dependencies'];
+    final YamlMap pubspecYaml = loadYaml(pubspec.readAsStringSync()) as YamlMap;
+    final YamlMap dependenciesMap = pubspecYaml['dependencies'] as YamlMap;
     expect(
         _VersionCode.fromString(dependenciesMap['characters'] as String) >
             _VersionCode.fromString('1.2.0'),
diff --git a/packages/metrics_center/CHANGELOG.md b/packages/metrics_center/CHANGELOG.md
index ec3aa37..80bf962 100644
--- a/packages/metrics_center/CHANGELOG.md
+++ b/packages/metrics_center/CHANGELOG.md
@@ -1,5 +1,6 @@
-## NEXT
+## 1.0.7
 
+* Updates code to fix strict-cast violations.
 * Updates minimum SDK version to Flutter 3.0.
 
 ## 1.0.6
diff --git a/packages/metrics_center/lib/src/google_benchmark.dart b/packages/metrics_center/lib/src/google_benchmark.dart
index 90ddef7..b3133a8 100644
--- a/packages/metrics_center/lib/src/google_benchmark.dart
+++ b/packages/metrics_center/lib/src/google_benchmark.dart
@@ -52,7 +52,7 @@
     )..removeWhere((String k, String v) => _kContextIgnoreKeys.contains(k));
 
     final List<MetricPoint> points = <MetricPoint>[];
-    for (final dynamic item in jsonResult['benchmarks']) {
+    for (final dynamic item in jsonResult['benchmarks'] as List<dynamic>) {
       _parseAnItem(item as Map<String, dynamic>, points, context);
     }
     return points;
diff --git a/packages/metrics_center/pubspec.yaml b/packages/metrics_center/pubspec.yaml
index 8391dad..51fd635 100644
--- a/packages/metrics_center/pubspec.yaml
+++ b/packages/metrics_center/pubspec.yaml
@@ -1,5 +1,5 @@
 name: metrics_center
-version: 1.0.6
+version: 1.0.7
 description:
   Support multiple performance metrics sources/formats and destinations.
 repository: https://github.com/flutter/packages/tree/main/packages/metrics_center
diff --git a/packages/pigeon/CHANGELOG.md b/packages/pigeon/CHANGELOG.md
index 9268a98..9342499 100644
--- a/packages/pigeon/CHANGELOG.md
+++ b/packages/pigeon/CHANGELOG.md
@@ -1,3 +1,7 @@
+## 7.1.5
+
+* Updates code to fix strict-cast violations.
+
 ## 7.1.4
 
 * [java] Fixes raw types lint issues.
diff --git a/packages/pigeon/lib/generator_tools.dart b/packages/pigeon/lib/generator_tools.dart
index 403e4ad..757464e 100644
--- a/packages/pigeon/lib/generator_tools.dart
+++ b/packages/pigeon/lib/generator_tools.dart
@@ -11,7 +11,7 @@
 /// The current version of pigeon.
 ///
 /// This must match the version in pubspec.yaml.
-const String pigeonVersion = '7.1.4';
+const String pigeonVersion = '7.1.5';
 
 /// Read all the content from [stdin] to a String.
 String readStdin() {
diff --git a/packages/pigeon/lib/pigeon_lib.dart b/packages/pigeon/lib/pigeon_lib.dart
index 6389a8e..db58d45 100644
--- a/packages/pigeon/lib/pigeon_lib.dart
+++ b/packages/pigeon/lib/pigeon_lib.dart
@@ -1338,33 +1338,34 @@
     final ArgResults results = _argParser.parse(args);
 
     final PigeonOptions opts = PigeonOptions(
-      input: results['input'],
-      dartOut: results['dart_out'],
-      dartTestOut: results['dart_test_out'],
-      objcHeaderOut: results['objc_header_out'],
-      objcSourceOut: results['objc_source_out'],
+      input: results['input'] as String?,
+      dartOut: results['dart_out'] as String?,
+      dartTestOut: results['dart_test_out'] as String?,
+      objcHeaderOut: results['objc_header_out'] as String?,
+      objcSourceOut: results['objc_source_out'] as String?,
       objcOptions: ObjcOptions(
-        prefix: results['objc_prefix'],
+        prefix: results['objc_prefix'] as String?,
       ),
-      javaOut: results['java_out'],
+      javaOut: results['java_out'] as String?,
       javaOptions: JavaOptions(
-        package: results['java_package'],
-        useGeneratedAnnotation: results['java_use_generated_annotation'],
+        package: results['java_package'] as String?,
+        useGeneratedAnnotation:
+            results['java_use_generated_annotation'] as bool?,
       ),
-      swiftOut: results['experimental_swift_out'],
-      kotlinOut: results['experimental_kotlin_out'],
+      swiftOut: results['experimental_swift_out'] as String?,
+      kotlinOut: results['experimental_kotlin_out'] as String?,
       kotlinOptions: KotlinOptions(
-        package: results['experimental_kotlin_package'],
+        package: results['experimental_kotlin_package'] as String?,
       ),
-      cppHeaderOut: results['experimental_cpp_header_out'],
-      cppSourceOut: results['experimental_cpp_source_out'],
+      cppHeaderOut: results['experimental_cpp_header_out'] as String?,
+      cppSourceOut: results['experimental_cpp_source_out'] as String?,
       cppOptions: CppOptions(
-        namespace: results['cpp_namespace'],
+        namespace: results['cpp_namespace'] as String?,
       ),
-      copyrightHeader: results['copyright_header'],
-      oneLanguage: results['one_language'],
-      astOut: results['ast_out'],
-      debugGenerators: results['debug_generators'],
+      copyrightHeader: results['copyright_header'] as String?,
+      oneLanguage: results['one_language'] as bool?,
+      astOut: results['ast_out'] as String?,
+      debugGenerators: results['debug_generators'] as bool?,
     );
     return opts;
   }
diff --git a/packages/pigeon/mock_handler_tester/test/message.dart b/packages/pigeon/mock_handler_tester/test/message.dart
index 8c03679..c159ef4 100644
--- a/packages/pigeon/mock_handler_tester/test/message.dart
+++ b/packages/pigeon/mock_handler_tester/test/message.dart
@@ -2,7 +2,7 @@
 // Use of this source code is governed by a BSD-style license that can be
 // found in the LICENSE file.
 //
-// Autogenerated from Pigeon (v7.1.4), do not edit directly.
+// Autogenerated from Pigeon (v7.1.5), do not edit directly.
 // See also: https://pub.dev/packages/pigeon
 // ignore_for_file: public_member_api_docs, non_constant_identifier_names, avoid_as, unused_import, unnecessary_parenthesis, prefer_null_aware_operators, omit_local_variable_types, unused_shown_name, unnecessary_import
 
diff --git a/packages/pigeon/mock_handler_tester/test/test.dart b/packages/pigeon/mock_handler_tester/test/test.dart
index 1e7a175..83fb22e 100644
--- a/packages/pigeon/mock_handler_tester/test/test.dart
+++ b/packages/pigeon/mock_handler_tester/test/test.dart
@@ -2,7 +2,7 @@
 // Use of this source code is governed by a BSD-style license that can be
 // found in the LICENSE file.
 //
-// Autogenerated from Pigeon (v7.1.4), do not edit directly.
+// Autogenerated from Pigeon (v7.1.5), do not edit directly.
 // See also: https://pub.dev/packages/pigeon
 // ignore_for_file: public_member_api_docs, non_constant_identifier_names, avoid_as, unused_import, unnecessary_parenthesis, unnecessary_import
 // ignore_for_file: avoid_relative_lib_imports
diff --git a/packages/pigeon/platform_tests/alternate_language_test_plugin/android/src/main/java/com/example/alternate_language_test_plugin/CoreTests.java b/packages/pigeon/platform_tests/alternate_language_test_plugin/android/src/main/java/com/example/alternate_language_test_plugin/CoreTests.java
index 1ab3cea..beea981 100644
--- a/packages/pigeon/platform_tests/alternate_language_test_plugin/android/src/main/java/com/example/alternate_language_test_plugin/CoreTests.java
+++ b/packages/pigeon/platform_tests/alternate_language_test_plugin/android/src/main/java/com/example/alternate_language_test_plugin/CoreTests.java
@@ -2,7 +2,7 @@
 // Use of this source code is governed by a BSD-style license that can be
 // found in the LICENSE file.
 //
-// Autogenerated from Pigeon (v7.1.4), do not edit directly.
+// Autogenerated from Pigeon (v7.1.5), do not edit directly.
 // See also: https://pub.dev/packages/pigeon
 
 package com.example.alternate_language_test_plugin;
diff --git a/packages/pigeon/platform_tests/alternate_language_test_plugin/ios/Classes/CoreTests.gen.h b/packages/pigeon/platform_tests/alternate_language_test_plugin/ios/Classes/CoreTests.gen.h
index 91cf9c9..4ab33c4 100644
--- a/packages/pigeon/platform_tests/alternate_language_test_plugin/ios/Classes/CoreTests.gen.h
+++ b/packages/pigeon/platform_tests/alternate_language_test_plugin/ios/Classes/CoreTests.gen.h
@@ -2,7 +2,7 @@
 // Use of this source code is governed by a BSD-style license that can be
 // found in the LICENSE file.
 //
-// Autogenerated from Pigeon (v7.1.4), do not edit directly.
+// Autogenerated from Pigeon (v7.1.5), do not edit directly.
 // See also: https://pub.dev/packages/pigeon
 
 #import <Foundation/Foundation.h>
diff --git a/packages/pigeon/platform_tests/alternate_language_test_plugin/ios/Classes/CoreTests.gen.m b/packages/pigeon/platform_tests/alternate_language_test_plugin/ios/Classes/CoreTests.gen.m
index 201f9c1..f135dbc 100644
--- a/packages/pigeon/platform_tests/alternate_language_test_plugin/ios/Classes/CoreTests.gen.m
+++ b/packages/pigeon/platform_tests/alternate_language_test_plugin/ios/Classes/CoreTests.gen.m
@@ -2,7 +2,7 @@
 // Use of this source code is governed by a BSD-style license that can be
 // found in the LICENSE file.
 //
-// Autogenerated from Pigeon (v7.1.4), do not edit directly.
+// Autogenerated from Pigeon (v7.1.5), do not edit directly.
 // See also: https://pub.dev/packages/pigeon
 
 #import "CoreTests.gen.h"
diff --git a/packages/pigeon/platform_tests/flutter_null_safe_unit_tests/lib/core_tests.gen.dart b/packages/pigeon/platform_tests/flutter_null_safe_unit_tests/lib/core_tests.gen.dart
index ce6ce96..09e6614 100644
--- a/packages/pigeon/platform_tests/flutter_null_safe_unit_tests/lib/core_tests.gen.dart
+++ b/packages/pigeon/platform_tests/flutter_null_safe_unit_tests/lib/core_tests.gen.dart
@@ -2,7 +2,7 @@
 // Use of this source code is governed by a BSD-style license that can be
 // found in the LICENSE file.
 //
-// Autogenerated from Pigeon (v7.1.4), do not edit directly.
+// Autogenerated from Pigeon (v7.1.5), do not edit directly.
 // See also: https://pub.dev/packages/pigeon
 // ignore_for_file: public_member_api_docs, non_constant_identifier_names, avoid_as, unused_import, unnecessary_parenthesis, prefer_null_aware_operators, omit_local_variable_types, unused_shown_name, unnecessary_import
 
diff --git a/packages/pigeon/platform_tests/flutter_null_safe_unit_tests/lib/flutter_unittests.gen.dart b/packages/pigeon/platform_tests/flutter_null_safe_unit_tests/lib/flutter_unittests.gen.dart
index b70aab8..916e6ba 100644
--- a/packages/pigeon/platform_tests/flutter_null_safe_unit_tests/lib/flutter_unittests.gen.dart
+++ b/packages/pigeon/platform_tests/flutter_null_safe_unit_tests/lib/flutter_unittests.gen.dart
@@ -2,7 +2,7 @@
 // Use of this source code is governed by a BSD-style license that can be
 // found in the LICENSE file.
 //
-// Autogenerated from Pigeon (v7.1.4), do not edit directly.
+// Autogenerated from Pigeon (v7.1.5), do not edit directly.
 // See also: https://pub.dev/packages/pigeon
 // ignore_for_file: public_member_api_docs, non_constant_identifier_names, avoid_as, unused_import, unnecessary_parenthesis, prefer_null_aware_operators, omit_local_variable_types, unused_shown_name, unnecessary_import
 
diff --git a/packages/pigeon/platform_tests/flutter_null_safe_unit_tests/lib/multiple_arity.gen.dart b/packages/pigeon/platform_tests/flutter_null_safe_unit_tests/lib/multiple_arity.gen.dart
index 8881778..fc58a7d 100644
--- a/packages/pigeon/platform_tests/flutter_null_safe_unit_tests/lib/multiple_arity.gen.dart
+++ b/packages/pigeon/platform_tests/flutter_null_safe_unit_tests/lib/multiple_arity.gen.dart
@@ -2,7 +2,7 @@
 // Use of this source code is governed by a BSD-style license that can be
 // found in the LICENSE file.
 //
-// Autogenerated from Pigeon (v7.1.4), do not edit directly.
+// Autogenerated from Pigeon (v7.1.5), do not edit directly.
 // See also: https://pub.dev/packages/pigeon
 // ignore_for_file: public_member_api_docs, non_constant_identifier_names, avoid_as, unused_import, unnecessary_parenthesis, prefer_null_aware_operators, omit_local_variable_types, unused_shown_name, unnecessary_import
 
diff --git a/packages/pigeon/platform_tests/flutter_null_safe_unit_tests/lib/non_null_fields.gen.dart b/packages/pigeon/platform_tests/flutter_null_safe_unit_tests/lib/non_null_fields.gen.dart
index 0c5f478..9064cfc 100644
--- a/packages/pigeon/platform_tests/flutter_null_safe_unit_tests/lib/non_null_fields.gen.dart
+++ b/packages/pigeon/platform_tests/flutter_null_safe_unit_tests/lib/non_null_fields.gen.dart
@@ -2,7 +2,7 @@
 // Use of this source code is governed by a BSD-style license that can be
 // found in the LICENSE file.
 //
-// Autogenerated from Pigeon (v7.1.4), do not edit directly.
+// Autogenerated from Pigeon (v7.1.5), do not edit directly.
 // See also: https://pub.dev/packages/pigeon
 // ignore_for_file: public_member_api_docs, non_constant_identifier_names, avoid_as, unused_import, unnecessary_parenthesis, prefer_null_aware_operators, omit_local_variable_types, unused_shown_name, unnecessary_import
 
diff --git a/packages/pigeon/platform_tests/flutter_null_safe_unit_tests/lib/null_fields.gen.dart b/packages/pigeon/platform_tests/flutter_null_safe_unit_tests/lib/null_fields.gen.dart
index cf90c27..f387231 100644
--- a/packages/pigeon/platform_tests/flutter_null_safe_unit_tests/lib/null_fields.gen.dart
+++ b/packages/pigeon/platform_tests/flutter_null_safe_unit_tests/lib/null_fields.gen.dart
@@ -2,7 +2,7 @@
 // Use of this source code is governed by a BSD-style license that can be
 // found in the LICENSE file.
 //
-// Autogenerated from Pigeon (v7.1.4), do not edit directly.
+// Autogenerated from Pigeon (v7.1.5), do not edit directly.
 // See also: https://pub.dev/packages/pigeon
 // ignore_for_file: public_member_api_docs, non_constant_identifier_names, avoid_as, unused_import, unnecessary_parenthesis, prefer_null_aware_operators, omit_local_variable_types, unused_shown_name, unnecessary_import
 
diff --git a/packages/pigeon/platform_tests/flutter_null_safe_unit_tests/lib/nullable_returns.gen.dart b/packages/pigeon/platform_tests/flutter_null_safe_unit_tests/lib/nullable_returns.gen.dart
index 928bfad..8bcf83a 100644
--- a/packages/pigeon/platform_tests/flutter_null_safe_unit_tests/lib/nullable_returns.gen.dart
+++ b/packages/pigeon/platform_tests/flutter_null_safe_unit_tests/lib/nullable_returns.gen.dart
@@ -2,7 +2,7 @@
 // Use of this source code is governed by a BSD-style license that can be
 // found in the LICENSE file.
 //
-// Autogenerated from Pigeon (v7.1.4), do not edit directly.
+// Autogenerated from Pigeon (v7.1.5), do not edit directly.
 // See also: https://pub.dev/packages/pigeon
 // ignore_for_file: public_member_api_docs, non_constant_identifier_names, avoid_as, unused_import, unnecessary_parenthesis, prefer_null_aware_operators, omit_local_variable_types, unused_shown_name, unnecessary_import
 
diff --git a/packages/pigeon/platform_tests/flutter_null_safe_unit_tests/lib/primitive.gen.dart b/packages/pigeon/platform_tests/flutter_null_safe_unit_tests/lib/primitive.gen.dart
index 60904c7..8099d23 100644
--- a/packages/pigeon/platform_tests/flutter_null_safe_unit_tests/lib/primitive.gen.dart
+++ b/packages/pigeon/platform_tests/flutter_null_safe_unit_tests/lib/primitive.gen.dart
@@ -2,7 +2,7 @@
 // Use of this source code is governed by a BSD-style license that can be
 // found in the LICENSE file.
 //
-// Autogenerated from Pigeon (v7.1.4), do not edit directly.
+// Autogenerated from Pigeon (v7.1.5), do not edit directly.
 // See also: https://pub.dev/packages/pigeon
 // ignore_for_file: public_member_api_docs, non_constant_identifier_names, avoid_as, unused_import, unnecessary_parenthesis, prefer_null_aware_operators, omit_local_variable_types, unused_shown_name, unnecessary_import
 
diff --git a/packages/pigeon/platform_tests/flutter_null_safe_unit_tests/test/multiple_arity_test.dart b/packages/pigeon/platform_tests/flutter_null_safe_unit_tests/test/multiple_arity_test.dart
index 95b38ea..8ff2a6b 100644
--- a/packages/pigeon/platform_tests/flutter_null_safe_unit_tests/test/multiple_arity_test.dart
+++ b/packages/pigeon/platform_tests/flutter_null_safe_unit_tests/test/multiple_arity_test.dart
@@ -17,7 +17,7 @@
             'dev.flutter.pigeon.MultipleArityHostApi.subtract', any))
         .thenAnswer((Invocation realInvocation) async {
       final Object input = MultipleArityHostApi.codec
-          .decodeMessage(realInvocation.positionalArguments[1])!;
+          .decodeMessage(realInvocation.positionalArguments[1] as ByteData?)!;
       final List<Object?> args = input as List<Object?>;
       final int x = (args[0] as int?)!;
       final int y = (args[1] as int?)!;
diff --git a/packages/pigeon/platform_tests/flutter_null_safe_unit_tests/test/test_util.dart b/packages/pigeon/platform_tests/flutter_null_safe_unit_tests/test/test_util.dart
index a776c00..44b196e 100644
--- a/packages/pigeon/platform_tests/flutter_null_safe_unit_tests/test/test_util.dart
+++ b/packages/pigeon/platform_tests/flutter_null_safe_unit_tests/test/test_util.dart
@@ -12,8 +12,8 @@
 ) {
   when(mockMessenger.send(channel, any))
       .thenAnswer((Invocation realInvocation) async {
-    final Object input =
-        codec.decodeMessage(realInvocation.positionalArguments[1])!;
+    final Object input = codec
+        .decodeMessage(realInvocation.positionalArguments[1] as ByteData?)!;
     final List<Object?> args = input as List<Object?>;
     return codec.encodeMessage(<Object>[args[0]!]);
   });
diff --git a/packages/pigeon/platform_tests/shared_test_plugin_code/lib/src/generated/core_tests.gen.dart b/packages/pigeon/platform_tests/shared_test_plugin_code/lib/src/generated/core_tests.gen.dart
index ce6ce96..09e6614 100644
--- a/packages/pigeon/platform_tests/shared_test_plugin_code/lib/src/generated/core_tests.gen.dart
+++ b/packages/pigeon/platform_tests/shared_test_plugin_code/lib/src/generated/core_tests.gen.dart
@@ -2,7 +2,7 @@
 // Use of this source code is governed by a BSD-style license that can be
 // found in the LICENSE file.
 //
-// Autogenerated from Pigeon (v7.1.4), do not edit directly.
+// Autogenerated from Pigeon (v7.1.5), do not edit directly.
 // See also: https://pub.dev/packages/pigeon
 // ignore_for_file: public_member_api_docs, non_constant_identifier_names, avoid_as, unused_import, unnecessary_parenthesis, prefer_null_aware_operators, omit_local_variable_types, unused_shown_name, unnecessary_import
 
diff --git a/packages/pigeon/platform_tests/test_plugin/android/src/main/kotlin/com/example/test_plugin/CoreTests.gen.kt b/packages/pigeon/platform_tests/test_plugin/android/src/main/kotlin/com/example/test_plugin/CoreTests.gen.kt
index 0a8f996..3447e4b 100644
--- a/packages/pigeon/platform_tests/test_plugin/android/src/main/kotlin/com/example/test_plugin/CoreTests.gen.kt
+++ b/packages/pigeon/platform_tests/test_plugin/android/src/main/kotlin/com/example/test_plugin/CoreTests.gen.kt
@@ -1,8 +1,8 @@
 // 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.
-// 
-// Autogenerated from Pigeon (v7.1.4), do not edit directly.
+//
+// Autogenerated from Pigeon (v7.1.5), do not edit directly.
 // See also: https://pub.dev/packages/pigeon
 
 package com.example.test_plugin
diff --git a/packages/pigeon/platform_tests/test_plugin/ios/Classes/CoreTests.gen.swift b/packages/pigeon/platform_tests/test_plugin/ios/Classes/CoreTests.gen.swift
index 5a6d9d5..0026c39 100644
--- a/packages/pigeon/platform_tests/test_plugin/ios/Classes/CoreTests.gen.swift
+++ b/packages/pigeon/platform_tests/test_plugin/ios/Classes/CoreTests.gen.swift
@@ -1,8 +1,8 @@
 // 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.
-// 
-// Autogenerated from Pigeon (v7.1.4), do not edit directly.
+//
+// Autogenerated from Pigeon (v7.1.5), do not edit directly.
 // See also: https://pub.dev/packages/pigeon
 
 import Foundation
@@ -117,23 +117,23 @@
   var aNullableString: String? = nil
 
   static func fromList(_ list: [Any?]) -> AllNullableTypes? {
-    let aNullableBool = list[0] as? Bool 
-    let aNullableInt = list[1] as? Int32 
-    let aNullableDouble = list[2] as? Double 
-    let aNullableByteArray = list[3] as? FlutterStandardTypedData 
-    let aNullable4ByteArray = list[4] as? FlutterStandardTypedData 
-    let aNullable8ByteArray = list[5] as? FlutterStandardTypedData 
-    let aNullableFloatArray = list[6] as? FlutterStandardTypedData 
-    let aNullableList = list[7] as? [Any?] 
-    let aNullableMap = list[8] as? [AnyHashable: Any?] 
-    let nullableNestedList = list[9] as? [[Bool?]?] 
-    let nullableMapWithAnnotations = list[10] as? [String?: String?] 
-    let nullableMapWithObject = list[11] as? [String?: Any?] 
+    let aNullableBool = list[0] as? Bool
+    let aNullableInt = list[1] as? Int32
+    let aNullableDouble = list[2] as? Double
+    let aNullableByteArray = list[3] as? FlutterStandardTypedData
+    let aNullable4ByteArray = list[4] as? FlutterStandardTypedData
+    let aNullable8ByteArray = list[5] as? FlutterStandardTypedData
+    let aNullableFloatArray = list[6] as? FlutterStandardTypedData
+    let aNullableList = list[7] as? [Any?]
+    let aNullableMap = list[8] as? [AnyHashable: Any?]
+    let nullableNestedList = list[9] as? [[Bool?]?]
+    let nullableMapWithAnnotations = list[10] as? [String?: String?]
+    let nullableMapWithObject = list[11] as? [String?: Any?]
     var aNullableEnum: AnEnum? = nil
     if let aNullableEnumRawValue = list[12] as? Int {
       aNullableEnum = AnEnum(rawValue: aNullableEnumRawValue)
     }
-    let aNullableString = list[13] as? String 
+    let aNullableString = list[13] as? String
 
     return AllNullableTypes(
       aNullableBool: aNullableBool,
diff --git a/packages/pigeon/platform_tests/test_plugin/macos/Classes/CoreTests.gen.swift b/packages/pigeon/platform_tests/test_plugin/macos/Classes/CoreTests.gen.swift
index 5a6d9d5..0026c39 100644
--- a/packages/pigeon/platform_tests/test_plugin/macos/Classes/CoreTests.gen.swift
+++ b/packages/pigeon/platform_tests/test_plugin/macos/Classes/CoreTests.gen.swift
@@ -1,8 +1,8 @@
 // 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.
-// 
-// Autogenerated from Pigeon (v7.1.4), do not edit directly.
+//
+// Autogenerated from Pigeon (v7.1.5), do not edit directly.
 // See also: https://pub.dev/packages/pigeon
 
 import Foundation
@@ -117,23 +117,23 @@
   var aNullableString: String? = nil
 
   static func fromList(_ list: [Any?]) -> AllNullableTypes? {
-    let aNullableBool = list[0] as? Bool 
-    let aNullableInt = list[1] as? Int32 
-    let aNullableDouble = list[2] as? Double 
-    let aNullableByteArray = list[3] as? FlutterStandardTypedData 
-    let aNullable4ByteArray = list[4] as? FlutterStandardTypedData 
-    let aNullable8ByteArray = list[5] as? FlutterStandardTypedData 
-    let aNullableFloatArray = list[6] as? FlutterStandardTypedData 
-    let aNullableList = list[7] as? [Any?] 
-    let aNullableMap = list[8] as? [AnyHashable: Any?] 
-    let nullableNestedList = list[9] as? [[Bool?]?] 
-    let nullableMapWithAnnotations = list[10] as? [String?: String?] 
-    let nullableMapWithObject = list[11] as? [String?: Any?] 
+    let aNullableBool = list[0] as? Bool
+    let aNullableInt = list[1] as? Int32
+    let aNullableDouble = list[2] as? Double
+    let aNullableByteArray = list[3] as? FlutterStandardTypedData
+    let aNullable4ByteArray = list[4] as? FlutterStandardTypedData
+    let aNullable8ByteArray = list[5] as? FlutterStandardTypedData
+    let aNullableFloatArray = list[6] as? FlutterStandardTypedData
+    let aNullableList = list[7] as? [Any?]
+    let aNullableMap = list[8] as? [AnyHashable: Any?]
+    let nullableNestedList = list[9] as? [[Bool?]?]
+    let nullableMapWithAnnotations = list[10] as? [String?: String?]
+    let nullableMapWithObject = list[11] as? [String?: Any?]
     var aNullableEnum: AnEnum? = nil
     if let aNullableEnumRawValue = list[12] as? Int {
       aNullableEnum = AnEnum(rawValue: aNullableEnumRawValue)
     }
-    let aNullableString = list[13] as? String 
+    let aNullableString = list[13] as? String
 
     return AllNullableTypes(
       aNullableBool: aNullableBool,
diff --git a/packages/pigeon/platform_tests/test_plugin/windows/pigeon/core_tests.gen.cpp b/packages/pigeon/platform_tests/test_plugin/windows/pigeon/core_tests.gen.cpp
index 70aa73a..b5d9f52 100644
--- a/packages/pigeon/platform_tests/test_plugin/windows/pigeon/core_tests.gen.cpp
+++ b/packages/pigeon/platform_tests/test_plugin/windows/pigeon/core_tests.gen.cpp
@@ -2,7 +2,7 @@
 // Use of this source code is governed by a BSD-style license that can be
 // found in the LICENSE file.
 //
-// Autogenerated from Pigeon (v7.1.4), do not edit directly.
+// Autogenerated from Pigeon (v7.1.5), do not edit directly.
 // See also: https://pub.dev/packages/pigeon
 
 #undef _HAS_EXCEPTIONS
diff --git a/packages/pigeon/platform_tests/test_plugin/windows/pigeon/core_tests.gen.h b/packages/pigeon/platform_tests/test_plugin/windows/pigeon/core_tests.gen.h
index 65cb31d..246425c 100644
--- a/packages/pigeon/platform_tests/test_plugin/windows/pigeon/core_tests.gen.h
+++ b/packages/pigeon/platform_tests/test_plugin/windows/pigeon/core_tests.gen.h
@@ -2,7 +2,7 @@
 // Use of this source code is governed by a BSD-style license that can be
 // found in the LICENSE file.
 //
-// Autogenerated from Pigeon (v7.1.4), do not edit directly.
+// Autogenerated from Pigeon (v7.1.5), do not edit directly.
 // See also: https://pub.dev/packages/pigeon
 
 #ifndef PIGEON_CORE_TESTS_GEN_H_
diff --git a/packages/pigeon/pubspec.yaml b/packages/pigeon/pubspec.yaml
index a51a23e..6d8514e 100644
--- a/packages/pigeon/pubspec.yaml
+++ b/packages/pigeon/pubspec.yaml
@@ -2,7 +2,7 @@
 description: Code generator tool to make communication between Flutter and the host platform type-safe and easier.
 repository: https://github.com/flutter/packages/tree/main/packages/pigeon
 issue_tracker: https://github.com/flutter/flutter/issues?q=is%3Aissue+is%3Aopen+label%3Apigeon
-version: 7.1.4 # This must match the version in lib/generator_tools.dart
+version: 7.1.5 # This must match the version in lib/generator_tools.dart
 
 environment:
   sdk: ">=2.12.0 <3.0.0"
diff --git a/packages/pigeon/tool/test.dart b/packages/pigeon/tool/test.dart
index c94f057..e15eac0 100644
--- a/packages/pigeon/tool/test.dart
+++ b/packages/pigeon/tool/test.dart
@@ -48,7 +48,7 @@
 ${parser.usage}''');
     exit(0);
   } else if (argResults.wasParsed(_testFlag)) {
-    testsToRun = argResults[_testFlag];
+    testsToRun = argResults[_testFlag] as List<String>;
   }
 
   // If no tests are provided, run everything that is supported on the current
diff --git a/packages/rfw/CHANGELOG.md b/packages/rfw/CHANGELOG.md
index f59c7af..5f44232 100644
--- a/packages/rfw/CHANGELOG.md
+++ b/packages/rfw/CHANGELOG.md
@@ -1,3 +1,7 @@
+## NEXT
+
+* Updates code to fix strict-cast violations.
+
 ## 1.0.7
 
 * Update README.
diff --git a/packages/rfw/example/wasm/lib/main.dart b/packages/rfw/example/wasm/lib/main.dart
index 181fb18..0bfe074 100644
--- a/packages/rfw/example/wasm/lib/main.dart
+++ b/packages/rfw/example/wasm/lib/main.dart
@@ -60,7 +60,7 @@
     }
     _runtime.update(const LibraryName(<String>['main']), decodeLibraryBlob(await interfaceFile.readAsBytes()));
     _logic = WasmModule(await logicFile.readAsBytes()).builder().build();
-    _dataFetcher = _logic.lookupFunction('value');
+    _dataFetcher = _logic.lookupFunction('value') as WasmFunction;
     _updateData();
     setState(() { RendererBinding.instance.allowFirstFrame(); });
   }
@@ -87,7 +87,7 @@
       data: _data,
       widget: const FullyQualifiedWidgetName(LibraryName(<String>['main']), 'root'),
       onEvent: (String name, DynamicMap arguments) {
-        final WasmFunction function = _logic.lookupFunction(name);
+        final WasmFunction function = _logic.lookupFunction(name) as WasmFunction;
         function.apply(_asList(arguments['arguments']));
         _updateData();
       },
diff --git a/packages/rfw/test/runtime_test.dart b/packages/rfw/test/runtime_test.dart
index 609b6e2..15b2d3c 100644
--- a/packages/rfw/test/runtime_test.dart
+++ b/packages/rfw/test/runtime_test.dart
@@ -394,7 +394,7 @@
     await tester.pump();
     expect(tester.widget<ColoredBox>(find.byType(ColoredBox)).color, const Color(0xFF000000));
 
-    data.update('color', json.decode('{"value":1}'));
+    data.update('color', json.decode('{"value":1}') as Object);
     await tester.pump();
     expect(tester.widget<ColoredBox>(find.byType(ColoredBox)).color, const Color(0x00000001));
 
diff --git a/packages/web_benchmarks/CHANGELOG.md b/packages/web_benchmarks/CHANGELOG.md
index d7edff7..efd1d9d 100644
--- a/packages/web_benchmarks/CHANGELOG.md
+++ b/packages/web_benchmarks/CHANGELOG.md
@@ -1,3 +1,7 @@
+## 0.1.0+2
+
+* Updates code to fix strict-cast violations.
+
 ## 0.1.0+1
 
 * Fixes lint warnings.
diff --git a/packages/web_benchmarks/lib/src/browser.dart b/packages/web_benchmarks/lib/src/browser.dart
index 52b31d6..40894dd 100644
--- a/packages/web_benchmarks/lib/src/browser.dart
+++ b/packages/web_benchmarks/lib/src/browser.dart
@@ -168,8 +168,8 @@
               '"Tracing.dataCollected" returned malformed data. '
               'Expected a List but got: ${value.runtimeType}');
         }
-        _tracingData
-            ?.addAll(event.params!['value'].cast<Map<String, dynamic>>());
+        _tracingData?.addAll((event.params!['value'] as List<dynamic>)
+            .cast<Map<String, dynamic>>());
       }
     });
     await _debugConnection?.sendCommand('Tracing.start', <String, dynamic>{
@@ -233,7 +233,7 @@
       throw Exception('Failed to locate system Chrome installation.');
     }
 
-    final String output = which.stdout;
+    final String output = which.stdout as String;
     return output.trim();
   } else if (io.Platform.isMacOS) {
     return '/Applications/Google Chrome.app/Contents/MacOS/Google Chrome';
@@ -306,7 +306,7 @@
   if (jsonObject == null || jsonObject.isEmpty) {
     return base;
   }
-  return base.resolve(jsonObject.first['webSocketDebuggerUrl']);
+  return base.resolve(jsonObject.first['webSocketDebuggerUrl'] as String);
 }
 
 /// Summarizes a Blink trace down to a few interesting values.
@@ -613,7 +613,7 @@
 ///
 /// Returns null if the value is null.
 int? _readInt(Map<String, dynamic> json, String key) {
-  final num? jsonValue = json[key];
+  final num? jsonValue = json[key] as num?;
 
   if (jsonValue == null) {
     return null; // ignore: avoid_returning_null
diff --git a/packages/web_benchmarks/lib/src/recorder.dart b/packages/web_benchmarks/lib/src/recorder.dart
index 9e5b182..383a147 100644
--- a/packages/web_benchmarks/lib/src/recorder.dart
+++ b/packages/web_benchmarks/lib/src/recorder.dart
@@ -402,7 +402,7 @@
 
   @override
   void _onError(dynamic error, StackTrace? stackTrace) {
-    _runCompleter.completeError(error, stackTrace);
+    _runCompleter.completeError(error as Object, stackTrace);
   }
 
   @override
@@ -522,7 +522,7 @@
 
   @override
   void _onError(dynamic error, StackTrace? stackTrace) {
-    _runCompleter!.completeError(error, stackTrace);
+    _runCompleter!.completeError(error as Object, stackTrace);
   }
 
   @override
diff --git a/packages/web_benchmarks/lib/src/runner.dart b/packages/web_benchmarks/lib/src/runner.dart
index 68c09f8..7c58e62 100644
--- a/packages/web_benchmarks/lib/src/runner.dart
+++ b/packages/web_benchmarks/lib/src/runner.dart
@@ -143,8 +143,8 @@
         chrome ??= await whenChromeIsReady;
         if (request.requestedUri.path.endsWith('/profile-data')) {
           final Map<String, dynamic> profile =
-              json.decode(await request.readAsString());
-          final String? benchmarkName = profile['name'];
+              json.decode(await request.readAsString()) as Map<String, dynamic>;
+          final String? benchmarkName = profile['name'] as String?;
           if (benchmarkName != benchmarkIterator.current) {
             profileData.completeError(Exception(
               'Browser returned benchmark results from a wrong benchmark.\n'
@@ -179,7 +179,7 @@
           return Response.ok('Stopped performance tracing');
         } else if (request.requestedUri.path.endsWith('/on-error')) {
           final Map<String, dynamic> errorDetails =
-              json.decode(await request.readAsString());
+              json.decode(await request.readAsString()) as Map<String, dynamic>;
           server.close();
           // Keep the stack trace as a string. It's thrown in the browser, not this Dart VM.
           final String errorMessage =
@@ -271,12 +271,13 @@
       final Map<String, List<BenchmarkScore>> results =
           <String, List<BenchmarkScore>>{};
       for (final Map<String, dynamic> profile in profiles) {
-        final String benchmarkName = profile['name'];
+        final String benchmarkName = profile['name'] as String;
         if (benchmarkName.isEmpty) {
           throw StateError('Benchmark name is empty');
         }
 
-        final List<String> scoreKeys = List<String>.from(profile['scoreKeys']);
+        final List<String> scoreKeys =
+            List<String>.from(profile['scoreKeys'] as Iterable<dynamic>);
         if (scoreKeys == null || scoreKeys.isEmpty) {
           throw StateError('No score keys in benchmark "$benchmarkName"');
         }
@@ -295,7 +296,7 @@
           }
           scores.add(BenchmarkScore(
             metric: key,
-            value: profile[key],
+            value: profile[key] as num,
           ));
         }
         results[benchmarkName] = scores;
diff --git a/packages/web_benchmarks/pubspec.yaml b/packages/web_benchmarks/pubspec.yaml
index 459a2a6..acb4d9b 100644
--- a/packages/web_benchmarks/pubspec.yaml
+++ b/packages/web_benchmarks/pubspec.yaml
@@ -2,7 +2,7 @@
 description: A benchmark harness for performance-testing Flutter apps in Chrome.
 repository: https://github.com/flutter/packages/tree/main/packages/web_benchmarks
 issue_tracker: https://github.com/flutter/flutter/issues?q=is%3Aissue+is%3Aopen+label%3A%22p%3A+web_benchmarks%22
-version: 0.1.0+1
+version: 0.1.0+2
 
 environment:
   sdk: '>=2.17.0 <3.0.0'
diff --git a/packages/web_benchmarks/test/src/browser_test_json_samples.dart b/packages/web_benchmarks/test/src/browser_test_json_samples.dart
index 8152aa1..aa6c56e 100644
--- a/packages/web_benchmarks/test/src/browser_test_json_samples.dart
+++ b/packages/web_benchmarks/test/src/browser_test_json_samples.dart
@@ -23,7 +23,7 @@
     "ts": 2338687258440,
     "tts": 375499
 }
-''');
+''') as Map<String, dynamic>;
 
 /// To test isUpdateAllLifecyclePhases. (Sampled from Chrome 89+)
 final Map<String, dynamic> updateLifecycleJson_89plus = jsonDecode('''
@@ -39,7 +39,7 @@
     "ts": 2338687265284,
     "tts": 375900
 }
-''');
+''') as Map<String, dynamic>;
 
 /// To test isBeginMeasuredFrame. (Sampled from Chrome 89+)
 final Map<String, dynamic> beginMeasuredFrameJson_89plus = jsonDecode('''
@@ -54,7 +54,7 @@
     "tid": 1,
     "ts": 2338687265932
 }
-''');
+''') as Map<String, dynamic>;
 
 /// To test isEndMeasuredFrame. (Sampled from Chrome 89+)
 final Map<String, dynamic> endMeasuredFrameJson_89plus = jsonDecode('''
@@ -69,7 +69,7 @@
     "tid": 1,
     "ts": 2338687440485
 }
-''');
+''') as Map<String, dynamic>;
 
 /// An unrelated data frame to test negative cases.
 final Map<String, dynamic> unrelatedPhXJson = jsonDecode('''
@@ -85,7 +85,7 @@
     "ts": 2338691143317,
     "tts": 1685405
 }
-''');
+''') as Map<String, dynamic>;
 
 /// Another unrelated data frame to test negative cases.
 final Map<String, dynamic> anotherUnrelatedJson = jsonDecode('''
@@ -100,4 +100,4 @@
     "tid": 1,
     "ts": 2338692906482
 }
-''');
+''') as Map<String, dynamic>;