Add a maxLines parameter for multiline Input. (#6310)

* Add a maxLines parameter for multiline Input.

If maxLines is 1, it's a single line Input that scrolls horizontally.
Otherwise, overflowed text wraps and scrolls vertically, taking up at
most `maxLines`.

Also fixed scrolling behavior so that the Input scrolls ensuring the
cursor is always visible.

Fixes https://github.com/flutter/flutter/issues/6271

* oops

* comments

* import

* test and RO.update fix

* constant

* fix.caretRect
This commit is contained in:
Matt Perry
2016-10-13 21:59:50 -04:00
committed by Ian Hickson
parent 71e05ff8f2
commit c13a6e275b
7 changed files with 298 additions and 101 deletions

View File

@@ -97,7 +97,7 @@ class TextFieldDemoState extends State<TextFieldDemo> {
new Input(
hintText: 'Tell us about yourself (optional)',
labelText: 'Life story',
multiline: true,
maxLines: 3,
formField: new FormField<String>()
),
new Row(