Enable unnecessary_await_in_return lint (#77434)

This commit is contained in:
Michael Goderbauer
2021-03-05 18:38:15 -08:00
committed by GitHub
parent 8a9042ba91
commit cb867bbedc
91 changed files with 183 additions and 183 deletions

View File

@@ -116,7 +116,7 @@ class FullScreenDialogDemoState extends State<FullScreenDialogDemo> {
final ThemeData theme = Theme.of(context);
final TextStyle dialogTextStyle = theme.textTheme.subtitle1!.copyWith(color: theme.textTheme.caption!.color);
return await (showDialog<bool>(
return showDialog<bool>(
context: context,
builder: (BuildContext context) {
return AlertDialog(
@@ -140,7 +140,7 @@ class FullScreenDialogDemoState extends State<FullScreenDialogDemo> {
],
);
},
) as Future<bool>);
) as Future<bool>;
}
@override

View File

@@ -143,7 +143,7 @@ class TextFormFieldDemoState extends State<TextFormFieldDemo> {
if (form == null || !_formWasEdited || form.validate())
return true;
return await (showDialog<bool>(
return showDialog<bool>(
context: context,
builder: (BuildContext context) {
return AlertDialog(
@@ -161,7 +161,7 @@ class TextFormFieldDemoState extends State<TextFormFieldDemo> {
],
);
},
) as Future<bool>);
) as Future<bool>;
}
@override