Sync analysis_options.yaml & cleanups (#117327)

This commit is contained in:
Michael Goderbauer 2022-12-20 14:15:39 -08:00 committed by GitHub
parent 81bc54be75
commit fdd2d7d64a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
42 changed files with 88 additions and 151 deletions

View file

@ -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

View file

@ -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,

View file

@ -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',
];

View file

@ -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<void> main() async {

View file

@ -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.

View file

@ -33,10 +33,10 @@ const List<String> expectedMainErrors = <String>[
];
const List<String> expectedUiErrors = <String>[
'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_ ]+\))$');

View file

@ -7,18 +7,18 @@ import 'package:flutter_devicelab/tasks/plugin_tests.dart';
Future<void> main() async {
await task(combine(<TaskFunction>[
PluginTest('apk', <String>['-a', 'java', '--platforms=android']),
PluginTest('apk', <String>['-a', 'kotlin', '--platforms=android']),
PluginTest('apk', <String>['-a', 'java', '--platforms=android']).call,
PluginTest('apk', <String>['-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', <String>['-a', 'java', '--platforms=android'], pluginCreateEnvironment:
<String, String>{'ENABLE_ANDROID_EMBEDDING_V2': 'true'}),
<String, String>{'ENABLE_ANDROID_EMBEDDING_V2': 'true'}).call,
PluginTest('apk', <String>['-a', 'kotlin', '--platforms=android'], pluginCreateEnvironment:
<String, String>{'ENABLE_ANDROID_EMBEDDING_V2': 'true'}),
<String, String>{'ENABLE_ANDROID_EMBEDDING_V2': 'true'}).call,
// Test that Dart-only plugins are supported.
PluginTest('apk', <String>['--platforms=android'], dartOnlyPlugin: true),
PluginTest('apk', <String>['--platforms=android'], dartOnlyPlugin: true).call,
// Test that FFI plugins are supported.
PluginTest('apk', <String>['--platforms=android'], template: 'plugin_ffi'),
PluginTest('apk', <String>['--platforms=android'], template: 'plugin_ffi').call,
]));
}

View file

@ -7,14 +7,14 @@ import 'package:flutter_devicelab/tasks/plugin_tests.dart';
Future<void> main() async {
await task(combine(<TaskFunction>[
PluginTest('ios', <String>['-i', 'objc', '--platforms=ios']),
PluginTest('ios', <String>['-i', 'swift', '--platforms=ios']),
PluginTest('macos', <String>['--platforms=macos']),
PluginTest('ios', <String>['-i', 'objc', '--platforms=ios']).call,
PluginTest('ios', <String>['-i', 'swift', '--platforms=ios']).call,
PluginTest('macos', <String>['--platforms=macos']).call,
// Test that Dart-only plugins are supported.
PluginTest('ios', <String>['--platforms=ios'], dartOnlyPlugin: true),
PluginTest('macos', <String>['--platforms=macos'], dartOnlyPlugin: true),
PluginTest('ios', <String>['--platforms=ios'], dartOnlyPlugin: true).call,
PluginTest('macos', <String>['--platforms=macos'], dartOnlyPlugin: true).call,
// Test that FFI plugins are supported.
PluginTest('ios', <String>['--platforms=ios'], template: 'plugin_ffi'),
PluginTest('macos', <String>['--platforms=macos'], template: 'plugin_ffi'),
PluginTest('ios', <String>['--platforms=ios'], template: 'plugin_ffi').call,
PluginTest('macos', <String>['--platforms=macos'], template: 'plugin_ffi').call,
]));
}

View file

@ -10,7 +10,7 @@ import 'package:flutter_devicelab/tasks/build_test_task.dart';
/// Smoke test of a successful task.
Future<void> main(List<String> args) async {
deviceOperatingSystem = DeviceOperatingSystem.fake;
await task(FakeBuildTestTask(args));
await task(FakeBuildTestTask(args).call);
}
class FakeBuildTestTask extends BuildTestTask {

View file

@ -18,11 +18,11 @@ final Directory galleryDirectory = dir('${flutterDirectory.path}/dev/integration
///
/// https://github.com/flutter/flutter/issues/103542
TaskFunction createGalleryTransitionBuildTest(List<String> 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 {

View file

@ -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: <String>['--flavor', 'paid'],
);
).call;
}
TaskFunction createIntegrationTestFlavorsTest() {
@ -34,14 +34,14 @@ TaskFunction createIntegrationTestFlavorsTest() {
'${flutterDirectory.path}/dev/integration_tests/flavors',
'integration_test/integration_test.dart',
extraOptions: <String>['--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: <String>[
'--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 {

View file

@ -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 {

View file

@ -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';

View file

@ -4,7 +4,7 @@
import 'package:flutter/material.dart';
String? unused;
String? unused; // ignore: unreachable_from_main
void main() {
runApp(const MyApp());

View file

@ -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';

View file

@ -4,7 +4,7 @@
// @dart = 2.12
String? x;
String? x; // ignore: unreachable_from_main
void main() {
print('--- TEST SUCCEEDED ---');

View file

@ -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<bool?>? onChanged;
final bool? value;
@override
Widget build(BuildContext context) {
return Row(
mainAxisSize: MainAxisSize.min,
children: <Widget>[
Checkbox(
onChanged: onChanged,
value: value,
),
Text(label),
],
);
}
}
class Options extends StatefulWidget {
const Options(this.model, {super.key});

View file

@ -80,7 +80,7 @@ void main(List<String> 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);

View file

@ -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);
}

View file

@ -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.

View file

@ -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.
///

View file

@ -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>[

View file

@ -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>[

View file

@ -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>[

View file

@ -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>[

View file

@ -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>[

View file

@ -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>[

View file

@ -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>[

View file

@ -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>[

View file

@ -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>[

View file

@ -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>[

View file

@ -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>[

View file

@ -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>[

View file

@ -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>[

View file

@ -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>[

View file

@ -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});

View file

@ -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

View file

@ -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

View file

@ -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.
///

View file

@ -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';

View file

@ -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';

View file

@ -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;
}
}