Unverified Commit 408c52fd authored by Jason Simmons's avatar Jason Simmons Committed by GitHub

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

parent ab268b4d
...@@ -143,7 +143,7 @@ class TextFormFieldDemoState extends State<TextFormFieldDemo> { ...@@ -143,7 +143,7 @@ class TextFormFieldDemoState extends State<TextFormFieldDemo> {
if (form == null || !_formWasEdited || form.validate()) if (form == null || !_formWasEdited || form.validate())
return true; return true;
return showDialog<bool>( final bool? result = await showDialog<bool>(
context: context, context: context,
builder: (BuildContext context) { builder: (BuildContext context) {
return AlertDialog( return AlertDialog(
...@@ -161,7 +161,8 @@ class TextFormFieldDemoState extends State<TextFormFieldDemo> { ...@@ -161,7 +161,8 @@ class TextFormFieldDemoState extends State<TextFormFieldDemo> {
], ],
); );
}, },
) as Future<bool>; );
return result!;
} }
@override @override
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment