diff --git a/analysis_options.yaml b/analysis_options.yaml index a3b07481ae..3dd7f088d3 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 21d9ddec60..a001f20c45 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 4659ebda96..97ee166660 100644 --- a/packages/cross_file/lib/src/types/html.dart +++ b/packages/cross_file/lib/src/types/html.dart @@ -142,7 +142,7 @@ class XFile extends XFileBase { 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 55e993dbb1..099b914aa1 100644 --- a/packages/cross_file/pubspec.yaml +++ b/packages/cross_file/pubspec.yaml @@ -2,7 +2,7 @@ name: cross_file 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 593f5b277e..a19e5098eb 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 @@ void main() { 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', []), diff --git a/packages/flutter_image/test/network_test.dart b/packages/flutter_image/test/network_test.dart index ecffd29270..6711fb2180 100644 --- a/packages/flutter_image/test/network_test.dart +++ b/packages/flutter_image/test/network_test.dart @@ -104,7 +104,7 @@ void main() { Timer.run(onAttempt); return fakeAsync.run((FakeAsync fakeAsync) { return NetworkImageWithRetry.defaultFetchStrategy(uri, failure); - }); + }) as Future; }, ); @@ -126,7 +126,7 @@ void main() { Timer.run(onAttempt); return fakeAsync.run((FakeAsync fakeAsync) { return NetworkImageWithRetry.defaultFetchStrategy(uri, failure); - }); + }) as Future; }, ); diff --git a/packages/flutter_markdown/test/image_test_mocks.dart b/packages/flutter_markdown/test/image_test_mocks.dart index 3aab6e8ff6..25c783edb7 100644 --- a/packages/flutter_markdown/test/image_test_mocks.dart +++ b/packages/flutter_markdown/test/image_test_mocks.dart @@ -43,11 +43,14 @@ MockHttpClient createMockImageHttpClient(SecurityContext? _) { // Define an image stream that streams the mock test image for all // image tests that request an image. StreamSubscription> imageStream(Invocation invocation) { - final void Function(List)? onData = invocation.positionalArguments[0]; - final void Function()? onDone = invocation.namedArguments[#onDone]; + final void Function(List)? onData = + invocation.positionalArguments[0] as Function(List)?; + 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>.fromIterable(>[transparentImage]).listen( onData, @@ -345,16 +348,17 @@ class MockHttpClientResponse extends Mock implements HttpClientResponse { StreamSubscription> listen(void Function(List event)? onData, {Function? onError, void Function()? onDone, bool? cancelOnError}) => super.noSuchMethod( - Invocation.method( - #listen, - [onData], - { - #onError: onError, - #onDone: onDone, - #cancelOnError: cancelOnError - }, - ), - returnValue: _FakeStreamSubscription>()); + Invocation.method( + #listen, + [onData], + { + #onError: onError, + #onDone: onDone, + #cancelOnError: cancelOnError + }, + ), + returnValue: _FakeStreamSubscription>()) + as StreamSubscription>; @override int get statusCode => diff --git a/packages/flutter_migrate/CHANGELOG.md b/packages/flutter_migrate/CHANGELOG.md index 59f8a732da..e6a465c99b 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 942c49174e..b3b2559467 100644 --- a/packages/flutter_migrate/lib/src/environment.dart +++ b/packages/flutter_migrate/lib/src/environment.dart @@ -46,7 +46,8 @@ class FlutterToolsEnvironment { // 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; } return FlutterToolsEnvironment(mapping: mapping); } diff --git a/packages/flutter_migrate/lib/src/utils.dart b/packages/flutter_migrate/lib/src/utils.dart index 6b46d73b55..84f70aa494 100644 --- a/packages/flutter_migrate/lib/src/utils.dart +++ b/packages/flutter_migrate/lib/src/utils.dart @@ -59,7 +59,7 @@ class MigrateUtils { commandDescription: 'git ${cmdArgs.join(' ')}'); return DiffResult( diffType: DiffType.command, - diff: result.stdout, + diff: result.stdout as String, exitCode: result.exitCode); } @@ -129,7 +129,7 @@ class MigrateUtils { } 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 @@ class MigrateUtils { _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 @@ abstract class MergeResult { 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 0cc819bf2f..a1f06cbe15 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 0f4376a960..10158ea3fd 100644 --- a/packages/flutter_migrate/test/migrate_test.dart +++ b/packages/flutter_migrate/test/migrate_test.dart @@ -92,8 +92,8 @@ Modified files: '--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 @@ class MyApp extends StatelessWidget { '--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 5c17021982..d04118f377 100644 --- a/packages/flutter_migrate/test/update_locks_test.dart +++ b/packages/flutter_migrate/test/update_locks_test.dart @@ -79,8 +79,8 @@ flutter: ''', 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 ec3aa37749..80bf962ff9 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 90ddef750c..b3133a8a7d 100644 --- a/packages/metrics_center/lib/src/google_benchmark.dart +++ b/packages/metrics_center/lib/src/google_benchmark.dart @@ -52,7 +52,7 @@ class GoogleBenchmarkParser { )..removeWhere((String k, String v) => _kContextIgnoreKeys.contains(k)); final List points = []; - for (final dynamic item in jsonResult['benchmarks']) { + for (final dynamic item in jsonResult['benchmarks'] as List) { _parseAnItem(item as Map, points, context); } return points; diff --git a/packages/metrics_center/pubspec.yaml b/packages/metrics_center/pubspec.yaml index 8391dadbf8..51fd635222 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 9268a98ce9..934249939f 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 403e4addbe..757464e491 100644 --- a/packages/pigeon/lib/generator_tools.dart +++ b/packages/pigeon/lib/generator_tools.dart @@ -11,7 +11,7 @@ import 'ast.dart'; /// 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 6389a8e67a..db58d4508a 100644 --- a/packages/pigeon/lib/pigeon_lib.dart +++ b/packages/pigeon/lib/pigeon_lib.dart @@ -1338,33 +1338,34 @@ ${_argParser.usage}'''; 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 8c0367914a..c159ef4551 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 1e7a175eaa..83fb22e7c6 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 1ab3cea7cd..beea981aab 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 91cf9c90bb..4ab33c4055 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 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 201f9c18ef..f135dbcb93 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 ce6ce96d88..09e661461a 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 b70aab824f..916e6bad99 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 8881778e37..fc58a7df66 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 0c5f47821c..9064cfc8cc 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 cf90c27f06..f387231179 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 928bfad95e..8bcf83a3fd 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 60904c72d8..8099d235e5 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 95b38ea594..8ff2a6b10c 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 @@ void main() { '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 args = input as List; 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 a776c00f9d..44b196e480 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 @@ void echoOneArgument( ) { 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 args = input as List; return codec.encodeMessage([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 ce6ce96d88..09e661461a 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 0a8f996c16..3447e4b70e 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 5a6d9d5abb..0026c39b7d 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 @@ struct AllNullableTypes { 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 5a6d9d5abb..0026c39b7d 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 @@ struct AllNullableTypes { 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 70aa73a771..b5d9f5263f 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 65cb31debc..246425c823 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 a51a23e862..6d8514e25b 100644 --- a/packages/pigeon/pubspec.yaml +++ b/packages/pigeon/pubspec.yaml @@ -2,7 +2,7 @@ name: pigeon 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 c94f0570aa..e15eac0027 100644 --- a/packages/pigeon/tool/test.dart +++ b/packages/pigeon/tool/test.dart @@ -48,7 +48,7 @@ usage: dart run tool/test.dart [-l | -t ] ${parser.usage}'''); exit(0); } else if (argResults.wasParsed(_testFlag)) { - testsToRun = argResults[_testFlag]; + testsToRun = argResults[_testFlag] as List; } // 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 f59c7af2bb..5f4423295a 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 181fb18518..0bfe074667 100644 --- a/packages/rfw/example/wasm/lib/main.dart +++ b/packages/rfw/example/wasm/lib/main.dart @@ -60,7 +60,7 @@ class _ExampleState extends State { } _runtime.update(const LibraryName(['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 @@ class _ExampleState extends State { data: _data, widget: const FullyQualifiedWidgetName(LibraryName(['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 609b6e28da..15b2d3c55b 100644 --- a/packages/rfw/test/runtime_test.dart +++ b/packages/rfw/test/runtime_test.dart @@ -394,7 +394,7 @@ void main() { await tester.pump(); expect(tester.widget(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(find.byType(ColoredBox)).color, const Color(0x00000001)); diff --git a/packages/web_benchmarks/CHANGELOG.md b/packages/web_benchmarks/CHANGELOG.md index d7edff7a13..efd1d9d8b7 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 52b31d69f9..40894ddd4b 100644 --- a/packages/web_benchmarks/lib/src/browser.dart +++ b/packages/web_benchmarks/lib/src/browser.dart @@ -168,8 +168,8 @@ class Chrome { '"Tracing.dataCollected" returned malformed data. ' 'Expected a List but got: ${value.runtimeType}'); } - _tracingData - ?.addAll(event.params!['value'].cast>()); + _tracingData?.addAll((event.params!['value'] as List) + .cast>()); } }); await _debugConnection?.sendCommand('Tracing.start', { @@ -233,7 +233,7 @@ String _findSystemChromeExecutable() { 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 @@ Future _getRemoteDebuggerUrl(Uri base) async { 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 @@ class BlinkTraceEvent { /// /// Returns null if the value is null. int? _readInt(Map 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 9e5b1825e7..383a147f65 100644 --- a/packages/web_benchmarks/lib/src/recorder.dart +++ b/packages/web_benchmarks/lib/src/recorder.dart @@ -402,7 +402,7 @@ abstract class WidgetRecorder extends Recorder implements FrameRecorder { @override void _onError(dynamic error, StackTrace? stackTrace) { - _runCompleter.completeError(error, stackTrace); + _runCompleter.completeError(error as Object, stackTrace); } @override @@ -522,7 +522,7 @@ abstract class WidgetBuildRecorder extends Recorder implements FrameRecorder { @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 68c09f873a..7c58e62000 100644 --- a/packages/web_benchmarks/lib/src/runner.dart +++ b/packages/web_benchmarks/lib/src/runner.dart @@ -143,8 +143,8 @@ class BenchmarkServer { chrome ??= await whenChromeIsReady; if (request.requestedUri.path.endsWith('/profile-data')) { final Map profile = - json.decode(await request.readAsString()); - final String? benchmarkName = profile['name']; + json.decode(await request.readAsString()) as Map; + 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 @@ class BenchmarkServer { return Response.ok('Stopped performance tracing'); } else if (request.requestedUri.path.endsWith('/on-error')) { final Map errorDetails = - json.decode(await request.readAsString()); + json.decode(await request.readAsString()) as Map; 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 @@ class BenchmarkServer { final Map> results = >{}; for (final Map 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 scoreKeys = List.from(profile['scoreKeys']); + final List scoreKeys = + List.from(profile['scoreKeys'] as Iterable); if (scoreKeys == null || scoreKeys.isEmpty) { throw StateError('No score keys in benchmark "$benchmarkName"'); } @@ -295,7 +296,7 @@ class BenchmarkServer { } 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 459a2a6442..acb4d9bf34 100644 --- a/packages/web_benchmarks/pubspec.yaml +++ b/packages/web_benchmarks/pubspec.yaml @@ -2,7 +2,7 @@ name: web_benchmarks 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 8152aa16bf..aa6c56e4d8 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 @@ final Map beginMainFrameJson_89plus = jsonDecode(''' "ts": 2338687258440, "tts": 375499 } -'''); +''') as Map; /// To test isUpdateAllLifecyclePhases. (Sampled from Chrome 89+) final Map updateLifecycleJson_89plus = jsonDecode(''' @@ -39,7 +39,7 @@ final Map updateLifecycleJson_89plus = jsonDecode(''' "ts": 2338687265284, "tts": 375900 } -'''); +''') as Map; /// To test isBeginMeasuredFrame. (Sampled from Chrome 89+) final Map beginMeasuredFrameJson_89plus = jsonDecode(''' @@ -54,7 +54,7 @@ final Map beginMeasuredFrameJson_89plus = jsonDecode(''' "tid": 1, "ts": 2338687265932 } -'''); +''') as Map; /// To test isEndMeasuredFrame. (Sampled from Chrome 89+) final Map endMeasuredFrameJson_89plus = jsonDecode(''' @@ -69,7 +69,7 @@ final Map endMeasuredFrameJson_89plus = jsonDecode(''' "tid": 1, "ts": 2338687440485 } -'''); +''') as Map; /// An unrelated data frame to test negative cases. final Map unrelatedPhXJson = jsonDecode(''' @@ -85,7 +85,7 @@ final Map unrelatedPhXJson = jsonDecode(''' "ts": 2338691143317, "tts": 1685405 } -'''); +''') as Map; /// Another unrelated data frame to test negative cases. final Map anotherUnrelatedJson = jsonDecode(''' @@ -100,4 +100,4 @@ final Map anotherUnrelatedJson = jsonDecode(''' "tid": 1, "ts": 2338692906482 } -'''); +''') as Map;