From c825237a386d2d050349ac0000df7e98daa38b64 Mon Sep 17 00:00:00 2001 From: Matt Perry Date: Mon, 26 Sep 2016 13:35:43 -0400 Subject: [PATCH] Fix improper Input usage in Gallery's Expansion demo. (#6019) Fixes https://github.com/flutter/flutter/issues/6011 --- .../lib/demo/expansion_panels_demo.dart | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) 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