mirror of
https://github.com/flutter/flutter.git
synced 2025-06-03 00:51:18 +00:00
Fix an NNBD error in the Gallery text form field demo (#79816)
This commit is contained in:
parent
ab268b4d97
commit
408c52fd70
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user