mirror of
https://github.com/flutter/flutter
synced 2024-08-27 20:10:11 +00:00
Apply void_checks lint. (#48267)
This commit is contained in:
parent
ab36346af6
commit
e2b169ebd3
|
@ -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
|
||||
|
|
|
@ -911,7 +911,7 @@ class _TextFieldState extends State<TextField> implements TextSelectionGestureDe
|
|||
void _handleHover(bool hovering) {
|
||||
if (hovering != _isHovering) {
|
||||
setState(() {
|
||||
return _isHovering = hovering;
|
||||
_isHovering = hovering;
|
||||
});
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1914,9 +1914,11 @@ void main() {
|
|||
'--- example property at max length --',
|
||||
style: propertyStyle,
|
||||
),
|
||||
DiagnosticsProperty<void>(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<String>(
|
||||
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,
|
||||
|
|
|
@ -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;
|
||||
},
|
||||
),
|
||||
},
|
||||
|
|
|
@ -53,7 +53,7 @@ void main() {
|
|||
|
||||
void test(String description, FutureOr<void> body()) {
|
||||
test_package.test(description, () {
|
||||
return io.IOOverrides.runZoned<FutureOr<void>>(
|
||||
io.IOOverrides.runZoned<FutureOr<void>>(
|
||||
body,
|
||||
createDirectory: (String path) => fs.directory(path),
|
||||
createFile: (String path) => fs.file(path),
|
||||
|
|
|
@ -643,7 +643,6 @@ class BuildDaemonCreator {
|
|||
if (testTargets.hasBuildFilters) {
|
||||
b.buildFilters.addAll(testTargets.buildFilters);
|
||||
}
|
||||
return b;
|
||||
}));
|
||||
}
|
||||
}
|
||||
|
|
|
@ -956,9 +956,8 @@ abstract class ResidentRunner {
|
|||
}
|
||||
}
|
||||
|
||||
Future<void> _serviceProtocolDone(dynamic object) {
|
||||
Future<void> _serviceProtocolDone(dynamic object) async {
|
||||
globals.printTrace('Service protocol connection closed.');
|
||||
return Future<void>.value(object);
|
||||
}
|
||||
|
||||
Future<void> _serviceProtocolError(dynamic error, StackTrace stack) {
|
||||
|
|
Loading…
Reference in a new issue