diff --git a/analysis_options.yaml b/analysis_options.yaml index d471f30c9a..29d72e7b5b 100644 --- a/analysis_options.yaml +++ b/analysis_options.yaml @@ -199,4 +199,4 @@ linter: # - use_string_buffers # has false positives: https://github.com/dart-lang/sdk/issues/34182 # - use_to_and_as_if_applicable # has false positives, so we prefer to catch this by code-review - valid_regexps - # - void_checks # not yet tested + - void_checks diff --git a/packages/flutter/lib/src/material/text_field.dart b/packages/flutter/lib/src/material/text_field.dart index 36643f9e41..fa5f267c13 100644 --- a/packages/flutter/lib/src/material/text_field.dart +++ b/packages/flutter/lib/src/material/text_field.dart @@ -911,7 +911,7 @@ class _TextFieldState extends State implements TextSelectionGestureDe void _handleHover(bool hovering) { if (hovering != _isHovering) { setState(() { - return _isHovering = hovering; + _isHovering = hovering; }); } } diff --git a/packages/flutter/test/foundation/diagnostics_test.dart b/packages/flutter/test/foundation/diagnostics_test.dart index 9f761e3352..403c7418f5 100644 --- a/packages/flutter/test/foundation/diagnostics_test.dart +++ b/packages/flutter/test/foundation/diagnostics_test.dart @@ -1914,9 +1914,11 @@ void main() { '--- example property at max length --', style: propertyStyle, ), - DiagnosticsProperty(null, - 'Message that is not allowed to wrap even though it is very long. Message that is not allowed to wrap even though it is very long. Message that is not allowed to wrap even though it is very long. Message that is not allowed to wrap.', - allowWrap: false), + DiagnosticsProperty( + null, + 'Message that is not allowed to wrap even though it is very long. Message that is not allowed to wrap even though it is very long. Message that is not allowed to wrap even though it is very long. Message that is not allowed to wrap.', + allowWrap: false, + ), DiagnosticsNode.message( '--- example property at max length --', style: propertyStyle, diff --git a/packages/flutter/test/widgets/shortcuts_test.dart b/packages/flutter/test/widgets/shortcuts_test.dart index e1f20982c7..5f628eaa8d 100644 --- a/packages/flutter/test/widgets/shortcuts_test.dart +++ b/packages/flutter/test/widgets/shortcuts_test.dart @@ -177,7 +177,6 @@ void main() { TestAction.key: () => TestAction( onInvoke: (FocusNode node, Intent intent) { invoked = true; - return true; }, ), }, @@ -215,7 +214,6 @@ void main() { TestAction.key: () => TestAction( onInvoke: (FocusNode node, Intent intent) { invoked = true; - return true; }, ), }, @@ -254,7 +252,6 @@ void main() { TestAction.key: () => TestAction( onInvoke: (FocusNode node, Intent intent) { invoked = true; - return true; }, ), }, diff --git a/packages/flutter_test/test/goldens_test.dart b/packages/flutter_test/test/goldens_test.dart index 512b8365c8..fbff2b7787 100644 --- a/packages/flutter_test/test/goldens_test.dart +++ b/packages/flutter_test/test/goldens_test.dart @@ -53,7 +53,7 @@ void main() { void test(String description, FutureOr body()) { test_package.test(description, () { - return io.IOOverrides.runZoned>( + io.IOOverrides.runZoned>( body, createDirectory: (String path) => fs.directory(path), createFile: (String path) => fs.file(path), diff --git a/packages/flutter_tools/lib/src/build_runner/web_fs.dart b/packages/flutter_tools/lib/src/build_runner/web_fs.dart index 243b1d88d3..ba078487ed 100644 --- a/packages/flutter_tools/lib/src/build_runner/web_fs.dart +++ b/packages/flutter_tools/lib/src/build_runner/web_fs.dart @@ -643,7 +643,6 @@ class BuildDaemonCreator { if (testTargets.hasBuildFilters) { b.buildFilters.addAll(testTargets.buildFilters); } - return b; })); } } diff --git a/packages/flutter_tools/lib/src/resident_runner.dart b/packages/flutter_tools/lib/src/resident_runner.dart index c7f314e07c..39f6c98cf4 100644 --- a/packages/flutter_tools/lib/src/resident_runner.dart +++ b/packages/flutter_tools/lib/src/resident_runner.dart @@ -956,9 +956,8 @@ abstract class ResidentRunner { } } - Future _serviceProtocolDone(dynamic object) { + Future _serviceProtocolDone(dynamic object) async { globals.printTrace('Service protocol connection closed.'); - return Future.value(object); } Future _serviceProtocolError(dynamic error, StackTrace stack) {