Correct missing return statements in nullably-typed functions (#95428)

This commit is contained in:
Sam Rawlins 2021-12-16 15:29:17 -08:00 committed by GitHub
parent dc8c7a4d89
commit 412e329af2
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 1 deletions

View file

@ -43,6 +43,7 @@ class DigitInputState extends State<DigitInput> {
onInvoke: (DeleteCharacterIntent intent) {
// For simplicity we delete everything in the section.
widget.controller.clear();
return null;
},
);
@ -84,7 +85,7 @@ class _DeleteDigit extends Action<DeleteCharacterIntent> {
final _SimpleUSPhoneNumberEntryState state;
@override
Object? invoke(DeleteCharacterIntent intent) {
void invoke(DeleteCharacterIntent intent) {
assert(callingAction != null);
callingAction?.invoke(intent);

View file

@ -273,4 +273,6 @@ String? _validateFlutterDir(String dirPath, { String? flutterRoot }) {
case FileSystemEntityType.notFound:
return null;
}
// In the case of any other [FileSystemEntityType]s, like the deprecated ones, return null.
return null;
}