Enable unnecessary_await_in_return lint (#77434)
This commit is contained in:
committed by
GitHub
parent
8a9042ba91
commit
cb867bbedc
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user