diff --git a/analysis_options.yaml b/analysis_options.yaml index c017556d9a8..13cfbe926e8 100644 --- a/analysis_options.yaml +++ b/analysis_options.yaml @@ -88,12 +88,14 @@ linter: # - cascade_invocations # doesn't match the typical style of this repo - cast_nullable_to_non_nullable # - close_sinks # not reliable enough + - collection_methods_unrelated_type - combinators_ordering # - comment_references # blocked on https://github.com/dart-lang/linter/issues/1142 - conditional_uri_does_not_exist # - constant_identifier_names # needs an opt-out https://github.com/dart-lang/linter/issues/204 - control_flow_in_finally - curly_braces_in_flow_control_structures + # - dangling_library_doc_comments # not yet tested - depend_on_referenced_packages - deprecated_consistency # - diagnostic_describe_all_properties # enabled only at the framework level (packages/flutter/lib) @@ -103,15 +105,18 @@ linter: - empty_catches - empty_constructor_bodies - empty_statements + - enable_null_safety - eol_at_end_of_file - exhaustive_cases - file_names - flutter_style_todos - hash_and_equals - implementation_imports + - implicit_call_tearoffs - iterable_contains_unrelated_type # - join_return_with_assignment # not required by flutter style - leading_newlines_in_multiline_strings + # - library_annotations # not yet tested - library_names - library_prefixes - library_private_types_in_public_api @@ -204,6 +209,7 @@ linter: - unnecessary_getters_setters # - unnecessary_lambdas # has false positives: https://github.com/dart-lang/linter/issues/498 - unnecessary_late + - unnecessary_library_directive - unnecessary_new - unnecessary_null_aware_assignments - unnecessary_null_aware_operator_on_extension_on_nullable @@ -218,6 +224,7 @@ linter: - unnecessary_string_interpolations - unnecessary_this - unnecessary_to_list_in_spreads + - unreachable_from_main - unrelated_type_equality_checks - unsafe_html - use_build_context_synchronously @@ -235,6 +242,7 @@ linter: - use_rethrow_when_possible - use_setters_to_change_properties # - use_string_buffers # has false positives: https://github.com/dart-lang/sdk/issues/34182 + - use_string_in_part_of_directives - use_super_parameters - use_test_throws_matchers # - use_to_and_as_if_applicable # has false positives, so we prefer to catch this by code-review diff --git a/dev/benchmarks/test_apps/stocks/lib/main.dart b/dev/benchmarks/test_apps/stocks/lib/main.dart index 8128be0dc6a..159de8c8eb6 100644 --- a/dev/benchmarks/test_apps/stocks/lib/main.dart +++ b/dev/benchmarks/test_apps/stocks/lib/main.dart @@ -2,8 +2,6 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -library stocks; - import 'package:flutter/material.dart'; import 'package:flutter/rendering.dart' show debugPaintBaselinesEnabled, diff --git a/dev/bots/analyze_snippet_code.dart b/dev/bots/analyze_snippet_code.dart index 3a1ed07d8a1..63050dbb9d0 100644 --- a/dev/bots/analyze_snippet_code.dart +++ b/dev/bots/analyze_snippet_code.dart @@ -457,6 +457,7 @@ class _SnippetChecker { '// ignore_for_file: directives_ordering', '// ignore_for_file: prefer_final_locals', '// ignore_for_file: unnecessary_import', + '// ignore_for_file: unreachable_from_main', '// ignore_for_file: unused_element', '// ignore_for_file: unused_local_variable', ]; diff --git a/dev/bots/post_process_docs.dart b/dev/bots/post_process_docs.dart index b88f04f6180..2bc9c038654 100644 --- a/dev/bots/post_process_docs.dart +++ b/dev/bots/post_process_docs.dart @@ -12,9 +12,6 @@ import 'package:platform/platform.dart' as platform; import 'package:process/process.dart'; -const String kDocsRoot = 'dev/docs'; -const String kPublishRoot = '$kDocsRoot/doc'; - class CommandException implements Exception {} Future main() async { diff --git a/dev/bots/test/analyze-snippet-code-test-dart-ui/ui.dart b/dev/bots/test/analyze-snippet-code-test-dart-ui/ui.dart index 479e28c8807..85c41d9deb3 100644 --- a/dev/bots/test/analyze-snippet-code-test-dart-ui/ui.dart +++ b/dev/bots/test/analyze-snippet-code-test-dart-ui/ui.dart @@ -4,8 +4,7 @@ // @dart = 2.12 -// This is a dummy dart:ui package for the sample code analyzer tests to use. - +/// This is a dummy dart:ui package for the sample code analyzer tests to use. library dart.ui; /// Bla bla bla bla bla bla bla bla bla. diff --git a/dev/bots/test/analyze_snippet_code_test.dart b/dev/bots/test/analyze_snippet_code_test.dart index d358c45f549..d79a57bf62e 100644 --- a/dev/bots/test/analyze_snippet_code_test.dart +++ b/dev/bots/test/analyze_snippet_code_test.dart @@ -33,10 +33,10 @@ const List expectedMainErrors = [ ]; const List expectedUiErrors = [ - 'dev/bots/test/analyze-snippet-code-test-dart-ui/ui.dart:15:7: (top-level declaration) (prefer_typing_uninitialized_variables)', - 'dev/bots/test/analyze-snippet-code-test-dart-ui/ui.dart:15:7: (top-level declaration) (missing_const_final_var_or_type)', - 'dev/bots/test/analyze-snippet-code-test-dart-ui/ui.dart:17:20: (top-level declaration) (prefer_final_fields)', - 'dev/bots/test/analyze-snippet-code-test-dart-ui/ui.dart:17:20: (top-level declaration) (unused_field)', + 'dev/bots/test/analyze-snippet-code-test-dart-ui/ui.dart:14:7: (top-level declaration) (prefer_typing_uninitialized_variables)', + 'dev/bots/test/analyze-snippet-code-test-dart-ui/ui.dart:14:7: (top-level declaration) (missing_const_final_var_or_type)', + 'dev/bots/test/analyze-snippet-code-test-dart-ui/ui.dart:16:20: (top-level declaration) (prefer_final_fields)', + 'dev/bots/test/analyze-snippet-code-test-dart-ui/ui.dart:16:20: (top-level declaration) (unused_field)', ]; final RegExp errorPrefixRE = RegExp(r'^([-a-z0-9/_.:]+): .*(\([-a-z_ ]+\) \([-a-z_ ]+\))$'); diff --git a/dev/devicelab/bin/tasks/plugin_test.dart b/dev/devicelab/bin/tasks/plugin_test.dart index 422c683c472..32bc6317579 100644 --- a/dev/devicelab/bin/tasks/plugin_test.dart +++ b/dev/devicelab/bin/tasks/plugin_test.dart @@ -7,18 +7,18 @@ import 'package:flutter_devicelab/tasks/plugin_tests.dart'; Future main() async { await task(combine([ - PluginTest('apk', ['-a', 'java', '--platforms=android']), - PluginTest('apk', ['-a', 'kotlin', '--platforms=android']), + PluginTest('apk', ['-a', 'java', '--platforms=android']).call, + PluginTest('apk', ['-a', 'kotlin', '--platforms=android']).call, // These create the plugins using the new v2 plugin templates but create the // apps using the old v1 embedding app templates to make sure new plugins // are by default backward compatible. PluginTest('apk', ['-a', 'java', '--platforms=android'], pluginCreateEnvironment: - {'ENABLE_ANDROID_EMBEDDING_V2': 'true'}), + {'ENABLE_ANDROID_EMBEDDING_V2': 'true'}).call, PluginTest('apk', ['-a', 'kotlin', '--platforms=android'], pluginCreateEnvironment: - {'ENABLE_ANDROID_EMBEDDING_V2': 'true'}), + {'ENABLE_ANDROID_EMBEDDING_V2': 'true'}).call, // Test that Dart-only plugins are supported. - PluginTest('apk', ['--platforms=android'], dartOnlyPlugin: true), + PluginTest('apk', ['--platforms=android'], dartOnlyPlugin: true).call, // Test that FFI plugins are supported. - PluginTest('apk', ['--platforms=android'], template: 'plugin_ffi'), + PluginTest('apk', ['--platforms=android'], template: 'plugin_ffi').call, ])); } diff --git a/dev/devicelab/bin/tasks/plugin_test_ios.dart b/dev/devicelab/bin/tasks/plugin_test_ios.dart index 6862d453c6c..c8fd5672877 100644 --- a/dev/devicelab/bin/tasks/plugin_test_ios.dart +++ b/dev/devicelab/bin/tasks/plugin_test_ios.dart @@ -7,14 +7,14 @@ import 'package:flutter_devicelab/tasks/plugin_tests.dart'; Future main() async { await task(combine([ - PluginTest('ios', ['-i', 'objc', '--platforms=ios']), - PluginTest('ios', ['-i', 'swift', '--platforms=ios']), - PluginTest('macos', ['--platforms=macos']), + PluginTest('ios', ['-i', 'objc', '--platforms=ios']).call, + PluginTest('ios', ['-i', 'swift', '--platforms=ios']).call, + PluginTest('macos', ['--platforms=macos']).call, // Test that Dart-only plugins are supported. - PluginTest('ios', ['--platforms=ios'], dartOnlyPlugin: true), - PluginTest('macos', ['--platforms=macos'], dartOnlyPlugin: true), + PluginTest('ios', ['--platforms=ios'], dartOnlyPlugin: true).call, + PluginTest('macos', ['--platforms=macos'], dartOnlyPlugin: true).call, // Test that FFI plugins are supported. - PluginTest('ios', ['--platforms=ios'], template: 'plugin_ffi'), - PluginTest('macos', ['--platforms=macos'], template: 'plugin_ffi'), + PluginTest('ios', ['--platforms=ios'], template: 'plugin_ffi').call, + PluginTest('macos', ['--platforms=macos'], template: 'plugin_ffi').call, ])); } diff --git a/dev/devicelab/bin/tasks/smoke_test_build_test.dart b/dev/devicelab/bin/tasks/smoke_test_build_test.dart index 2df08ac6e05..1ac10434d53 100644 --- a/dev/devicelab/bin/tasks/smoke_test_build_test.dart +++ b/dev/devicelab/bin/tasks/smoke_test_build_test.dart @@ -10,7 +10,7 @@ import 'package:flutter_devicelab/tasks/build_test_task.dart'; /// Smoke test of a successful task. Future main(List args) async { deviceOperatingSystem = DeviceOperatingSystem.fake; - await task(FakeBuildTestTask(args)); + await task(FakeBuildTestTask(args).call); } class FakeBuildTestTask extends BuildTestTask { diff --git a/dev/devicelab/lib/tasks/gallery.dart b/dev/devicelab/lib/tasks/gallery.dart index ae03b16d5f5..ea7a07d74e6 100644 --- a/dev/devicelab/lib/tasks/gallery.dart +++ b/dev/devicelab/lib/tasks/gallery.dart @@ -18,11 +18,11 @@ final Directory galleryDirectory = dir('${flutterDirectory.path}/dev/integration /// /// https://github.com/flutter/flutter/issues/103542 TaskFunction createGalleryTransitionBuildTest(List args, {bool semanticsEnabled = false}) { - return GalleryTransitionBuildTest(args, semanticsEnabled: semanticsEnabled); + return GalleryTransitionBuildTest(args, semanticsEnabled: semanticsEnabled).call; } TaskFunction createGalleryTransitionTest({bool semanticsEnabled = false}) { - return GalleryTransitionTest(semanticsEnabled: semanticsEnabled); + return GalleryTransitionTest(semanticsEnabled: semanticsEnabled).call; } TaskFunction createGalleryTransitionE2EBuildTest( @@ -39,7 +39,7 @@ TaskFunction createGalleryTransitionE2EBuildTest( timelineTraceFile: null, driverFile: 'transitions_perf_e2e_test', enableImpeller: enableImpeller, - ); + ).call; } TaskFunction createGalleryTransitionE2ETest({ @@ -56,7 +56,7 @@ TaskFunction createGalleryTransitionE2ETest({ timelineTraceFile: null, driverFile: 'transitions_perf_e2e_test', enableImpeller: enableImpeller, - ); + ).call; } TaskFunction createGalleryTransitionHybridBuildTest( @@ -67,7 +67,7 @@ TaskFunction createGalleryTransitionHybridBuildTest( args, semanticsEnabled: semanticsEnabled, driverFile: semanticsEnabled ? 'transitions_perf_hybrid_with_semantics_test' : 'transitions_perf_hybrid_test', - ); + ).call; } TaskFunction createGalleryTransitionHybridTest({bool semanticsEnabled = false}) { @@ -76,7 +76,7 @@ TaskFunction createGalleryTransitionHybridTest({bool semanticsEnabled = false}) driverFile: semanticsEnabled ? 'transitions_perf_hybrid_with_semantics_test' : 'transitions_perf_hybrid_test', - ); + ).call; } class GalleryTransitionTest { diff --git a/dev/devicelab/lib/tasks/integration_tests.dart b/dev/devicelab/lib/tasks/integration_tests.dart index 6e5df519ec5..cebf40d2480 100644 --- a/dev/devicelab/lib/tasks/integration_tests.dart +++ b/dev/devicelab/lib/tasks/integration_tests.dart @@ -11,14 +11,14 @@ TaskFunction createChannelsIntegrationTest() { return DriverTest( '${flutterDirectory.path}/dev/integration_tests/channels', 'lib/main.dart', - ); + ).call; } TaskFunction createPlatformInteractionTest() { return DriverTest( '${flutterDirectory.path}/dev/integration_tests/platform_interaction', 'lib/main.dart', - ); + ).call; } TaskFunction createFlavorsTest() { @@ -26,7 +26,7 @@ TaskFunction createFlavorsTest() { '${flutterDirectory.path}/dev/integration_tests/flavors', 'lib/main.dart', extraOptions: ['--flavor', 'paid'], - ); + ).call; } TaskFunction createIntegrationTestFlavorsTest() { @@ -34,14 +34,14 @@ TaskFunction createIntegrationTestFlavorsTest() { '${flutterDirectory.path}/dev/integration_tests/flavors', 'integration_test/integration_test.dart', extraOptions: ['--flavor', 'paid'], - ); + ).call; } TaskFunction createExternalUiIntegrationTest() { return DriverTest( '${flutterDirectory.path}/dev/integration_tests/external_ui', 'lib/main.dart', - ); + ).call; } TaskFunction createPlatformChannelSampleTest({String? deviceIdOverride}) { @@ -49,35 +49,35 @@ TaskFunction createPlatformChannelSampleTest({String? deviceIdOverride}) { '${flutterDirectory.path}/examples/platform_channel', 'test_driver/button_tap.dart', deviceIdOverride: deviceIdOverride, - ); + ).call; } TaskFunction createPlatformChannelSwiftSampleTest() { return DriverTest( '${flutterDirectory.path}/examples/platform_channel_swift', 'test_driver/button_tap.dart', - ); + ).call; } TaskFunction createEmbeddedAndroidViewsIntegrationTest() { return DriverTest( '${flutterDirectory.path}/dev/integration_tests/android_views', 'lib/main.dart', - ); + ).call; } TaskFunction createHybridAndroidViewsIntegrationTest() { return DriverTest( '${flutterDirectory.path}/dev/integration_tests/hybrid_android_views', 'lib/main.dart', - ); + ).call; } TaskFunction createAndroidSemanticsIntegrationTest() { return DriverTest( '${flutterDirectory.path}/dev/integration_tests/android_semantics_testing', 'lib/main.dart', - ); + ).call; } TaskFunction createIOSPlatformViewTests() { @@ -87,42 +87,42 @@ TaskFunction createIOSPlatformViewTests() { extraOptions: [ '--dart-define=ENABLE_DRIVER_EXTENSION=true', ], - ); + ).call; } TaskFunction createEndToEndKeyboardTest() { return DriverTest( '${flutterDirectory.path}/dev/integration_tests/ui', 'lib/keyboard_resize.dart', - ); + ).call; } TaskFunction createEndToEndFrameNumberTest() { return DriverTest( '${flutterDirectory.path}/dev/integration_tests/ui', 'lib/frame_number.dart', - ); + ).call; } TaskFunction createEndToEndDriverTest() { return DriverTest( '${flutterDirectory.path}/dev/integration_tests/ui', 'lib/driver.dart', - ); + ).call; } TaskFunction createEndToEndScreenshotTest() { return DriverTest( '${flutterDirectory.path}/dev/integration_tests/ui', 'lib/screenshot.dart', - ); + ).call; } TaskFunction createEndToEndKeyboardTextfieldTest() { return DriverTest( '${flutterDirectory.path}/dev/integration_tests/ui', 'lib/keyboard_textfield.dart', - ); + ).call; } TaskFunction dartDefinesTask() { @@ -132,21 +132,21 @@ TaskFunction dartDefinesTask() { '--dart-define=test.valueA=Example,A', '--dart-define=test.valueB=Value', ], - ); + ).call; } TaskFunction createEndToEndIntegrationTest() { return IntegrationTest( '${flutterDirectory.path}/dev/integration_tests/ui', 'integration_test/integration_test.dart', - ); + ).call; } TaskFunction createSpellCheckIntegrationTest() { return IntegrationTest( '${flutterDirectory.path}/dev/integration_tests/spell_check', 'integration_test/integration_test.dart', - ); + ).call; } TaskFunction createWindowsStartupDriverTest({String? deviceIdOverride}) { @@ -154,7 +154,7 @@ TaskFunction createWindowsStartupDriverTest({String? deviceIdOverride}) { '${flutterDirectory.path}/dev/integration_tests/windows_startup_test', 'lib/main.dart', deviceIdOverride: deviceIdOverride, - ); + ).call; } class DriverTest { diff --git a/dev/devicelab/lib/tasks/run_tests.dart b/dev/devicelab/lib/tasks/run_tests.dart index 5898db4325e..9840af1bc30 100644 --- a/dev/devicelab/lib/tasks/run_tests.dart +++ b/dev/devicelab/lib/tasks/run_tests.dart @@ -12,11 +12,11 @@ import '../framework/task_result.dart'; import '../framework/utils.dart'; TaskFunction createAndroidRunDebugTest() { - return AndroidRunOutputTest(release: false); + return AndroidRunOutputTest(release: false).call; } TaskFunction createAndroidRunReleaseTest() { - return AndroidRunOutputTest(release: true); + return AndroidRunOutputTest(release: true).call; } TaskFunction createMacOSRunDebugTest() { @@ -27,7 +27,7 @@ TaskFunction createMacOSRunDebugTest() { 'lib/main.dart', release: false, allowStderr: true, - ); + ).call; } TaskFunction createMacOSRunReleaseTest() { @@ -38,7 +38,7 @@ TaskFunction createMacOSRunReleaseTest() { 'lib/main.dart', release: true, allowStderr: true, - ); + ).call; } TaskFunction createWindowsRunDebugTest() { @@ -46,7 +46,7 @@ TaskFunction createWindowsRunDebugTest() { '${flutterDirectory.path}/dev/integration_tests/ui', 'lib/empty.dart', release: false, - ); + ).call; } TaskFunction createWindowsRunReleaseTest() { @@ -54,7 +54,7 @@ TaskFunction createWindowsRunReleaseTest() { '${flutterDirectory.path}/dev/integration_tests/ui', 'lib/empty.dart', release: true, - ); + ).call; } class AndroidRunOutputTest extends RunOutputTask { diff --git a/dev/integration_tests/deferred_components_test/lib/component1.dart b/dev/integration_tests/deferred_components_test/lib/component1.dart index 3b2101510c2..c674e703403 100644 --- a/dev/integration_tests/deferred_components_test/lib/component1.dart +++ b/dev/integration_tests/deferred_components_test/lib/component1.dart @@ -2,8 +2,6 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -library component1; - import 'package:flutter/material.dart'; diff --git a/dev/integration_tests/non_nullable/lib/main.dart b/dev/integration_tests/non_nullable/lib/main.dart index 1b9ebd0a5bf..753af90c8d3 100644 --- a/dev/integration_tests/non_nullable/lib/main.dart +++ b/dev/integration_tests/non_nullable/lib/main.dart @@ -4,7 +4,7 @@ import 'package:flutter/material.dart'; -String? unused; +String? unused; // ignore: unreachable_from_main void main() { runApp(const MyApp()); diff --git a/dev/integration_tests/web/lib/null_assert_main.dart b/dev/integration_tests/web/lib/null_assert_main.dart index 80c0a38bbae..e9588628ccd 100644 --- a/dev/integration_tests/web/lib/null_assert_main.dart +++ b/dev/integration_tests/web/lib/null_assert_main.dart @@ -2,6 +2,8 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. +// ignore_for_file: enable_null_safety + // @dart = 2.8 import 'null_enabled_api.dart'; diff --git a/dev/integration_tests/web/lib/null_safe_main.dart b/dev/integration_tests/web/lib/null_safe_main.dart index a5b6068054c..0ef000f6b32 100644 --- a/dev/integration_tests/web/lib/null_safe_main.dart +++ b/dev/integration_tests/web/lib/null_safe_main.dart @@ -4,7 +4,7 @@ // @dart = 2.12 -String? x; +String? x; // ignore: unreachable_from_main void main() { print('--- TEST SUCCEEDED ---'); diff --git a/dev/manual_tests/lib/star_border.dart b/dev/manual_tests/lib/star_border.dart index 172bb9e950c..d5096d06671 100644 --- a/dev/manual_tests/lib/star_border.dart +++ b/dev/manual_tests/lib/star_border.dart @@ -228,28 +228,6 @@ class OptionModel extends ChangeNotifier { } } -class LabeledCheckbox extends StatelessWidget { - const LabeledCheckbox({super.key, required this.label, this.onChanged, this.value}); - - final String label; - final ValueChanged? onChanged; - final bool? value; - - @override - Widget build(BuildContext context) { - return Row( - mainAxisSize: MainAxisSize.min, - children: [ - Checkbox( - onChanged: onChanged, - value: value, - ), - Text(label), - ], - ); - } -} - class Options extends StatefulWidget { const Options(this.model, {super.key}); diff --git a/dev/tools/vitool/bin/main.dart b/dev/tools/vitool/bin/main.dart index 2b95399f13d..3a4b736204c 100644 --- a/dev/tools/vitool/bin/main.dart +++ b/dev/tools/vitool/bin/main.dart @@ -80,7 +80,7 @@ void main(List args) { } if (argResults.wasParsed('part-of')) { - generatedSb.write('part of ${argResults['part-of']};\n'); + generatedSb.write('part of ${argResults['part-of']}; // ignore: use_string_in_part_of_directives\n'); } final Animation animation = Animation.fromFrameData(frames); diff --git a/packages/flutter/lib/src/gestures/recognizer.dart b/packages/flutter/lib/src/gestures/recognizer.dart index 3119d433523..f7e63f03335 100644 --- a/packages/flutter/lib/src/gestures/recognizer.dart +++ b/packages/flutter/lib/src/gestures/recognizer.dart @@ -427,7 +427,8 @@ abstract class OneSequenceGestureRecognizer extends GestureRecognizer { void startTrackingPointer(int pointer, [Matrix4? transform]) { GestureBinding.instance.pointerRouter.addRoute(pointer, handleEvent, transform); _trackedPointers.add(pointer); - assert(!_entries.containsValue(pointer)); + // TODO(goderbauer): Enable assert after recognizers properly clean up their defunct `_entries`, see https://github.com/flutter/flutter/issues/117356. + // assert(!_entries.containsKey(pointer)); _entries[pointer] = _addPointerToArena(pointer); } diff --git a/packages/flutter/lib/src/material/animated_icons/animated_icons.dart b/packages/flutter/lib/src/material/animated_icons/animated_icons.dart index a28f0155a61..55a8ac01637 100644 --- a/packages/flutter/lib/src/material/animated_icons/animated_icons.dart +++ b/packages/flutter/lib/src/material/animated_icons/animated_icons.dart @@ -2,7 +2,8 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -part of material_animated_icons; +// TODO(goderbauer): Clean up the part-of hack currently used for testing the private implementation. +part of material_animated_icons; // ignore: use_string_in_part_of_directives // The code for drawing animated icons is kept in a private API, as we are not // yet ready for exposing a public API for (partial) vector graphics support. diff --git a/packages/flutter/lib/src/material/animated_icons/animated_icons_data.dart b/packages/flutter/lib/src/material/animated_icons/animated_icons_data.dart index 242ba5a049b..6efca7d8176 100644 --- a/packages/flutter/lib/src/material/animated_icons/animated_icons_data.dart +++ b/packages/flutter/lib/src/material/animated_icons/animated_icons_data.dart @@ -8,7 +8,7 @@ // while the _AnimatedIconData interface which used to deliver the icon data is // kept private. -part of material_animated_icons; +part of material_animated_icons; // ignore: use_string_in_part_of_directives /// Identifier for the supported Material Design animated icons. /// diff --git a/packages/flutter/lib/src/material/animated_icons/data/add_event.g.dart b/packages/flutter/lib/src/material/animated_icons/data/add_event.g.dart index 27305b8c0c2..88d4600bf93 100644 --- a/packages/flutter/lib/src/material/animated_icons/data/add_event.g.dart +++ b/packages/flutter/lib/src/material/animated_icons/data/add_event.g.dart @@ -4,7 +4,7 @@ // AUTOGENERATED FILE DO NOT EDIT! // This file was generated by vitool. -part of material_animated_icons; +part of material_animated_icons; // ignore: use_string_in_part_of_directives const _AnimatedIconData _$add_event = _AnimatedIconData( Size(48.0, 48.0), <_PathFrames>[ diff --git a/packages/flutter/lib/src/material/animated_icons/data/arrow_menu.g.dart b/packages/flutter/lib/src/material/animated_icons/data/arrow_menu.g.dart index 2649d8cc4e8..549c8703d0e 100644 --- a/packages/flutter/lib/src/material/animated_icons/data/arrow_menu.g.dart +++ b/packages/flutter/lib/src/material/animated_icons/data/arrow_menu.g.dart @@ -4,7 +4,7 @@ // AUTOGENERATED FILE DO NOT EDIT! // This file was generated by vitool. -part of material_animated_icons; +part of material_animated_icons; // ignore: use_string_in_part_of_directives const _AnimatedIconData _$arrow_menu = _AnimatedIconData( Size(48.0, 48.0), <_PathFrames>[ diff --git a/packages/flutter/lib/src/material/animated_icons/data/close_menu.g.dart b/packages/flutter/lib/src/material/animated_icons/data/close_menu.g.dart index a0b86c0ea96..311a74534b0 100644 --- a/packages/flutter/lib/src/material/animated_icons/data/close_menu.g.dart +++ b/packages/flutter/lib/src/material/animated_icons/data/close_menu.g.dart @@ -4,7 +4,7 @@ // AUTOGENERATED FILE DO NOT EDIT! // This file was generated by vitool. -part of material_animated_icons; +part of material_animated_icons; // ignore: use_string_in_part_of_directives const _AnimatedIconData _$close_menu = _AnimatedIconData( Size(48.0, 48.0), <_PathFrames>[ diff --git a/packages/flutter/lib/src/material/animated_icons/data/ellipsis_search.g.dart b/packages/flutter/lib/src/material/animated_icons/data/ellipsis_search.g.dart index ef8802d5c02..9f539c6c8de 100644 --- a/packages/flutter/lib/src/material/animated_icons/data/ellipsis_search.g.dart +++ b/packages/flutter/lib/src/material/animated_icons/data/ellipsis_search.g.dart @@ -4,7 +4,7 @@ // AUTOGENERATED FILE DO NOT EDIT! // This file was generated by vitool. -part of material_animated_icons; +part of material_animated_icons; // ignore: use_string_in_part_of_directives const _AnimatedIconData _$ellipsis_search = _AnimatedIconData( Size(96.0, 96.0), <_PathFrames>[ diff --git a/packages/flutter/lib/src/material/animated_icons/data/event_add.g.dart b/packages/flutter/lib/src/material/animated_icons/data/event_add.g.dart index 8a012f217a3..1b64f8998fd 100644 --- a/packages/flutter/lib/src/material/animated_icons/data/event_add.g.dart +++ b/packages/flutter/lib/src/material/animated_icons/data/event_add.g.dart @@ -4,7 +4,7 @@ // AUTOGENERATED FILE DO NOT EDIT! // This file was generated by vitool. -part of material_animated_icons; +part of material_animated_icons; // ignore: use_string_in_part_of_directives const _AnimatedIconData _$event_add = _AnimatedIconData( Size(48.0, 48.0), <_PathFrames>[ diff --git a/packages/flutter/lib/src/material/animated_icons/data/home_menu.g.dart b/packages/flutter/lib/src/material/animated_icons/data/home_menu.g.dart index 447a3701fa2..559c45311f4 100644 --- a/packages/flutter/lib/src/material/animated_icons/data/home_menu.g.dart +++ b/packages/flutter/lib/src/material/animated_icons/data/home_menu.g.dart @@ -4,7 +4,7 @@ // AUTOGENERATED FILE DO NOT EDIT! // This file was generated by vitool. -part of material_animated_icons; +part of material_animated_icons; // ignore: use_string_in_part_of_directives const _AnimatedIconData _$home_menu = _AnimatedIconData( Size(48.0, 48.0), <_PathFrames>[ diff --git a/packages/flutter/lib/src/material/animated_icons/data/list_view.g.dart b/packages/flutter/lib/src/material/animated_icons/data/list_view.g.dart index 35814a03a16..25d544ce90a 100644 --- a/packages/flutter/lib/src/material/animated_icons/data/list_view.g.dart +++ b/packages/flutter/lib/src/material/animated_icons/data/list_view.g.dart @@ -4,7 +4,7 @@ // AUTOGENERATED FILE DO NOT EDIT! // This file was generated by vitool. -part of material_animated_icons; +part of material_animated_icons; // ignore: use_string_in_part_of_directives const _AnimatedIconData _$list_view = _AnimatedIconData( Size(48.0, 48.0), <_PathFrames>[ diff --git a/packages/flutter/lib/src/material/animated_icons/data/menu_arrow.g.dart b/packages/flutter/lib/src/material/animated_icons/data/menu_arrow.g.dart index 78613e3e179..4717a936157 100644 --- a/packages/flutter/lib/src/material/animated_icons/data/menu_arrow.g.dart +++ b/packages/flutter/lib/src/material/animated_icons/data/menu_arrow.g.dart @@ -4,7 +4,7 @@ // AUTOGENERATED FILE DO NOT EDIT! // This file was generated by vitool. -part of material_animated_icons; +part of material_animated_icons; // ignore: use_string_in_part_of_directives const _AnimatedIconData _$menu_arrow = _AnimatedIconData( Size(48.0, 48.0), <_PathFrames>[ diff --git a/packages/flutter/lib/src/material/animated_icons/data/menu_close.g.dart b/packages/flutter/lib/src/material/animated_icons/data/menu_close.g.dart index 43e194fd1e4..27d3408a911 100644 --- a/packages/flutter/lib/src/material/animated_icons/data/menu_close.g.dart +++ b/packages/flutter/lib/src/material/animated_icons/data/menu_close.g.dart @@ -4,7 +4,7 @@ // AUTOGENERATED FILE DO NOT EDIT! // This file was generated by vitool. -part of material_animated_icons; +part of material_animated_icons; // ignore: use_string_in_part_of_directives const _AnimatedIconData _$menu_close = _AnimatedIconData( Size(48.0, 48.0), <_PathFrames>[ diff --git a/packages/flutter/lib/src/material/animated_icons/data/menu_home.g.dart b/packages/flutter/lib/src/material/animated_icons/data/menu_home.g.dart index dfdcc79d62b..53c3ec78d06 100644 --- a/packages/flutter/lib/src/material/animated_icons/data/menu_home.g.dart +++ b/packages/flutter/lib/src/material/animated_icons/data/menu_home.g.dart @@ -4,7 +4,7 @@ // AUTOGENERATED FILE DO NOT EDIT! // This file was generated by vitool. -part of material_animated_icons; +part of material_animated_icons; // ignore: use_string_in_part_of_directives const _AnimatedIconData _$menu_home = _AnimatedIconData( Size(48.0, 48.0), <_PathFrames>[ diff --git a/packages/flutter/lib/src/material/animated_icons/data/pause_play.g.dart b/packages/flutter/lib/src/material/animated_icons/data/pause_play.g.dart index b9d117ee51b..2d9d9266384 100644 --- a/packages/flutter/lib/src/material/animated_icons/data/pause_play.g.dart +++ b/packages/flutter/lib/src/material/animated_icons/data/pause_play.g.dart @@ -4,7 +4,7 @@ // AUTOGENERATED FILE DO NOT EDIT! // This file was generated by vitool. -part of material_animated_icons; +part of material_animated_icons; // ignore: use_string_in_part_of_directives const _AnimatedIconData _$pause_play = _AnimatedIconData( Size(48.0, 48.0), <_PathFrames>[ diff --git a/packages/flutter/lib/src/material/animated_icons/data/play_pause.g.dart b/packages/flutter/lib/src/material/animated_icons/data/play_pause.g.dart index a850aa364e0..71fa1939fee 100644 --- a/packages/flutter/lib/src/material/animated_icons/data/play_pause.g.dart +++ b/packages/flutter/lib/src/material/animated_icons/data/play_pause.g.dart @@ -4,7 +4,7 @@ // AUTOGENERATED FILE DO NOT EDIT! // This file was generated by vitool. -part of material_animated_icons; +part of material_animated_icons; // ignore: use_string_in_part_of_directives const _AnimatedIconData _$play_pause = _AnimatedIconData( Size(48.0, 48.0), <_PathFrames>[ diff --git a/packages/flutter/lib/src/material/animated_icons/data/search_ellipsis.g.dart b/packages/flutter/lib/src/material/animated_icons/data/search_ellipsis.g.dart index 93ae867ea0b..6760e2a592b 100644 --- a/packages/flutter/lib/src/material/animated_icons/data/search_ellipsis.g.dart +++ b/packages/flutter/lib/src/material/animated_icons/data/search_ellipsis.g.dart @@ -4,7 +4,7 @@ // AUTOGENERATED FILE DO NOT EDIT! // This file was generated by vitool. -part of material_animated_icons; +part of material_animated_icons; // ignore: use_string_in_part_of_directives const _AnimatedIconData _$search_ellipsis = _AnimatedIconData( Size(96.0, 96.0), <_PathFrames>[ diff --git a/packages/flutter/lib/src/material/animated_icons/data/view_list.g.dart b/packages/flutter/lib/src/material/animated_icons/data/view_list.g.dart index af9606b1b31..65ec982b5b8 100644 --- a/packages/flutter/lib/src/material/animated_icons/data/view_list.g.dart +++ b/packages/flutter/lib/src/material/animated_icons/data/view_list.g.dart @@ -4,7 +4,7 @@ // AUTOGENERATED FILE DO NOT EDIT! // This file was generated by vitool. -part of material_animated_icons; +part of material_animated_icons; // ignore: use_string_in_part_of_directives const _AnimatedIconData _$view_list = _AnimatedIconData( Size(48.0, 48.0), <_PathFrames>[ diff --git a/packages/flutter/test/widgets/snapshot_widget_test.dart b/packages/flutter/test/widgets/snapshot_widget_test.dart index 030944c0d66..5bfe0c3086d 100644 --- a/packages/flutter/test/widgets/snapshot_widget_test.dart +++ b/packages/flutter/test/widgets/snapshot_widget_test.dart @@ -299,23 +299,6 @@ void main() { }, skip: kIsWeb); // TODO(jonahwilliams): https://github.com/flutter/flutter/issues/106689 } -class TestController extends SnapshotController { - int addedListenerCount = 0; - int removedListenerCount = 0; - - @override - void addListener(ui.VoidCallback listener) { - addedListenerCount += 1; - super.addListener(listener); - } - - @override - void removeListener(ui.VoidCallback listener) { - removedListenerCount += 1; - super.removeListener(listener); - } -} - class TestPlatformView extends SingleChildRenderObjectWidget { const TestPlatformView({super.key}); diff --git a/packages/flutter_tools/lib/src/reporting/custom_dimensions.dart b/packages/flutter_tools/lib/src/reporting/custom_dimensions.dart index b9cbeea8193..1d9bfff9e8c 100644 --- a/packages/flutter_tools/lib/src/reporting/custom_dimensions.dart +++ b/packages/flutter_tools/lib/src/reporting/custom_dimensions.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. -part of reporting; +part of 'reporting.dart'; /// The collection of custom dimensions understood by the analytics backend. /// When adding to this list, first ensure that the custom dimension is diff --git a/packages/flutter_tools/lib/src/reporting/disabled_usage.dart b/packages/flutter_tools/lib/src/reporting/disabled_usage.dart index 661dbd29748..63695b3f444 100644 --- a/packages/flutter_tools/lib/src/reporting/disabled_usage.dart +++ b/packages/flutter_tools/lib/src/reporting/disabled_usage.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. -part of reporting; +part of 'reporting.dart'; class DisabledUsage implements Usage { @override diff --git a/packages/flutter_tools/lib/src/reporting/events.dart b/packages/flutter_tools/lib/src/reporting/events.dart index 7a227fc0069..cb495bdd55d 100644 --- a/packages/flutter_tools/lib/src/reporting/events.dart +++ b/packages/flutter_tools/lib/src/reporting/events.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. -part of reporting; +part of 'reporting.dart'; /// A generic usage even that does not involve custom dimensions. /// diff --git a/packages/flutter_tools/lib/src/reporting/usage.dart b/packages/flutter_tools/lib/src/reporting/usage.dart index 8c3e78be1fd..454554cbd17 100644 --- a/packages/flutter_tools/lib/src/reporting/usage.dart +++ b/packages/flutter_tools/lib/src/reporting/usage.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. -part of reporting; +part of 'reporting.dart'; const String _kFlutterUA = 'UA-67589403-6'; diff --git a/packages/flutter_tools/test/general.shard/android/android_workflow_test.dart b/packages/flutter_tools/test/general.shard/android/android_workflow_test.dart index 61021d04394..7a6977cac9b 100644 --- a/packages/flutter_tools/test/general.shard/android/android_workflow_test.dart +++ b/packages/flutter_tools/test/general.shard/android/android_workflow_test.dart @@ -8,7 +8,6 @@ import 'package:flutter_tools/src/android/android_studio.dart'; import 'package:flutter_tools/src/android/android_workflow.dart'; import 'package:flutter_tools/src/base/file_system.dart'; import 'package:flutter_tools/src/base/logger.dart'; -import 'package:flutter_tools/src/base/os.dart'; import 'package:flutter_tools/src/base/platform.dart'; import 'package:flutter_tools/src/base/user_messages.dart'; import 'package:flutter_tools/src/base/version.dart'; @@ -571,20 +570,6 @@ class FakeAndroidSdkVersion extends Fake implements AndroidSdkVersion { String get platformName => ''; } -class CustomFakeOperatingSystemUtils extends Fake implements OperatingSystemUtils { - CustomFakeOperatingSystemUtils({ - HostPlatform hostPlatform = HostPlatform.linux_x64 - }) : _hostPlatform = hostPlatform; - - final HostPlatform _hostPlatform; - - @override - String get name => 'Linux'; - - @override - HostPlatform get hostPlatform => _hostPlatform; -} - class FakeAndroidStudio extends Fake implements AndroidStudio { @override String get javaPath => 'java'; diff --git a/packages/flutter_tools/test/general.shard/migrations/cmake_project_migration_test.dart b/packages/flutter_tools/test/general.shard/migrations/cmake_project_migration_test.dart index 559ff16b3aa..36ee8d7824a 100644 --- a/packages/flutter_tools/test/general.shard/migrations/cmake_project_migration_test.dart +++ b/packages/flutter_tools/test/general.shard/migrations/cmake_project_migration_test.dart @@ -5,7 +5,6 @@ import 'package:file/file.dart'; import 'package:file/memory.dart'; import 'package:flutter_tools/src/base/logger.dart'; -import 'package:flutter_tools/src/base/project_migrator.dart'; import 'package:flutter_tools/src/base/terminal.dart'; import 'package:flutter_tools/src/cmake_project.dart'; import 'package:flutter_tools/src/migrations/cmake_custom_command_migration.dart'; @@ -165,16 +164,3 @@ class FakeCmakeProject extends Fake implements CmakeBasedProject { @override final File managedCmakeFile; } - -class FakeCmakeMigrator extends ProjectMigrator { - FakeCmakeMigrator() - : super(BufferLogger.test()); - - @override - void migrate() { } - - @override - String migrateLine(String line) { - return line; - } -}