Skip to content

No way to set the initial value of an Input if you use formField #5549

@mpcomplete

Description

@mpcomplete

From #5505:

You can't do this:

body: new Form(
  child: new Block(
    children: <Widget>[
      new Input(
        value: new InputValue(text: initialValue),
        formField: new FormField<String>(
          setter:  (String val) {
            this._username = val;
          }
        )
      ),
    ]
  )
)

Because you can't use both value and formField. We need a way to set the initial value.

Metadata

Metadata

Assignees

No one assigned

    Labels

    frameworkflutter/packages/flutter repository. See also f: labels.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions