Fix an NNBD error in the Gallery text form field demo (#79816)

This commit is contained in:
Jason Simmons 2021-04-07 14:29:07 -07:00 committed by GitHub
parent ab268b4d97
commit 408c52fd70
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

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