diff --git a/examples/flutter_gallery/lib/demo/expansion_panels_demo.dart b/examples/flutter_gallery/lib/demo/expansion_panels_demo.dart index 6a3697b95f8..37226a19ff9 100644 --- a/examples/flutter_gallery/lib/demo/expansion_panels_demo.dart +++ b/examples/flutter_gallery/lib/demo/expansion_panels_demo.dart @@ -191,17 +191,15 @@ class _ExpansionPanelsDemoState extends State { return new CollapsibleBody( margin: const EdgeInsets.symmetric(horizontal: 16.0), - child: new Input( - hintText: item.hint, - labelText: item.name, - value: new InputValue( - text: item.value + child: new Form( + child: new Input( + hintText: item.hint, + labelText: item.name, + value: new InputValue(text: item.value), + formField: new FormField( + setter: (String val) { item.value = val; } + ), ), - onSubmitted: (InputValue val) { - setState(() { - item.value = val.text; - }); - } ), onSave: close, onCancel: close