Skip to content

Password text fields shouldn't be multi-line #41853

@mdebbar

Description

@mdebbar

Current behavior

Flutter allows obscured text fields to be multi-line, but it prevents new lines from being added to the text.

Motivation

Passwords are typically entered in single-line fields. It doesn't make sense to have a password field with multiple lines.

Another reason is that the web supports obscuring text only on single-line text fields (aka <input type="password">).

Proposed change

Throw if EditableText.obscureText is true and EditableText.maxLines is greater than 1.

Metadata

Metadata

Assignees

Labels

a: text inputEntering text in a text field or keyboard related problemsc: API breakBackwards-incompatible API changesf: material designflutter/packages/flutter/material repository.frameworkflutter/packages/flutter repository. See also f: labels.

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions