From a47520a15752813e463af848dac52605ec5bb6b5 Mon Sep 17 00:00:00 2001 From: Misha Dynin Date: Tue, 8 Sep 2015 17:35:08 -0700 Subject: [PATCH] Allow setting of initial value in the Input component. --- packages/flutter/lib/src/widgets/input.dart | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/packages/flutter/lib/src/widgets/input.dart b/packages/flutter/lib/src/widgets/input.dart index 189c0ae00e..63aa269a1d 100644 --- a/packages/flutter/lib/src/widgets/input.dart +++ b/packages/flutter/lib/src/widgets/input.dart @@ -22,16 +22,17 @@ class Input extends StatefulComponent { Input({ GlobalKey key, + String initialValue: '', this.placeholder, this.onChanged, this.keyboardType : KeyboardType_TEXT - }): super(key: key); + }): _value = initialValue, super(key: key); int keyboardType; String placeholder; StringValueChanged onChanged; - String _value = ''; + String _value; EditableString _editableValue; KeyboardHandle _keyboardHandle = KeyboardHandle.unattached;